2013-07-17 117 views
1

我是新来的android和我做了一个自动完成的textview,它工作,但我的问题是在android.R.layout.simple_dropdown_item_1line的文本大小比simple_dropdown_item_1line大。设置大小android.R.layout.simple_dropdown_item_1line

那么有没有一种方法可以设置文本大小或设置android.R.layout.simple_dropdown_item_1line的大小? 。

在此先感谢

回答

1

创建一个自定义布局,或复制android.R.layout.simple_dropdown_item_1内容创建一个新的XML,并通过这个XML来AutoCompleteTextView

样本:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

<TextView 
    android:id="@+id/autoComplete" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:textSize="10sp"  
    /> 
</LinearLayout>