1

私はアンドロイドが初めてで、オートコンプリートのテキストビューを作成しましたが、それは機能していますが、私の問題は のテキストサイズandroid.R.layout.simple_dropdown_item_1lineが より大きいことsimple_dropdown_item_1lineです。

テキストサイズを設定したり、のサイズを設定したりできる方法はありandroid.R.layout.simple_dropdown_item_1lineますか? .

前もって感謝します

4

2 に答える 2

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>
于 2013-07-17T11:12:28.383 に答える