android bug fix

来源:互联网 发布:use衣服知乎 编辑:程序博客网 时间:2024/05/16 13:06

  android  widgets:

1:  AutoCompleteTextView

   1.1 AutoCompleteTextView   dropdown item can not be shown correctly .

          in 320*240 phonens it may show above AutoCompleteTextView  not bellow.

               

             this problem is caused by an attibute:      android:layout_margin

            this code will cause err showing as upper:               

<AutoCompleteTextView android:id="@+id/wf_input_edit"android:layout_width="180dip" android:layout_height="wrap_content"android:textSize="14dip" android:layout_margin="20dip"android:layout_gravity="center"android:singleLine="true"android:completionThreshold="1"android:hint="@string/citysearch_hint2"  />


       after change it to  follws every thing seems to be fine (on 320*240   & 800*480 )    the only thing i changed is the  "layout_margin"

<AutoCompleteTextView android:id="@+id/wf_input_edit"android:layout_width="180dip" android:layout_height="wrap_content"android:textSize="14dip" android:layout_marginLeft="20dip"android:layout_marginRight="20dip"android:layout_gravity="center"android:singleLine="true"android:completionThreshold="1"android:hint="@string/citysearch_hint2"  />

原创粉丝点击