【问题标题】:set size of android.R.layout.simple_dropdown_item_1line设置 android.R.layout.simple_dropdown_item_1line 的大小
【发布时间】:2015-04-05 04:35:56
【问题描述】:

我是 android 新手,我制作了一个自动完成的 textview 并且它正在工作,但我的问题是 android.R.layout.simple_dropdown_item_1line 中的文本大小大于 simple_dropdown_item_1line

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

提前致谢

【问题讨论】:

    标签: android autocomplete


    【解决方案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>
    

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-11
      • 2013-08-06
      • 2018-06-27
      • 2011-02-11
      相关资源
      最近更新 更多