Abi*_*bin 0 android autocompletetextview
我是android的初学者我试过请帮助我的代码是
<AutoCompleteTextView
android:id="@+id/autoCompleteTextView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="top"
android:hint="@string/receipt_account_name" >
Run Code Online (Sandbox Code Playgroud)
我尝试使用android:dropDownVerticalOffset ="5dp",android:dropDownHeight ="5dp",android:height ="5dp",android:layout_height ="5dp"等.没有定义字体大小.
在java class adapter = new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line,COUNTRIES);
请帮忙.
像这样创建自己的xml
布局/ item.xml
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="5dp"/>
Run Code Online (Sandbox Code Playgroud)
然后尝试下面
adapter = new ArrayAdapter<T>(this, R.layout.item,R.id.text1, COUNTRIES);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2614 次 |
最近记录: |