如何设置AutoCompleteTextView结果的大小? [英] How to set the size of an AutoCompleteTextView Result?
本文介绍了如何设置AutoCompleteTextView结果的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有人知道如何设置一个AutoCompleteTextView结果的大小?
Does anybody know How to set the size of an AutoCompleteTextView Result ?
我尝试的android:TEXTSIZE =12SP
但只修改TextView的文本的大小,而不是结果。
I try android:textSize="12sp"
But it only modify the size of the text in the TextView, not in the result.
推荐答案
最好的办法就是创建自己的
the best way is to create your own
1)创建一个XML文件与您定制的设计......如dropdown.xml
1st) create a xml file with your customized design... such as "dropdown.xml"
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textAutoComplete"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#F3F5E1"
android:gravity="center_vertical"
android:padding="5dp" />
和在你的code使用这种
and in your code use this
AutoCompleteTextView etChoose= (AutoCompleteTextView) findViewById(R.id.etChoose);
ArrayAdapter<String> adapterChoose = new ArrayAdapter<String>(this,R.layout.dropdown, ChooseList);
这篇关于如何设置AutoCompleteTextView结果的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文