Android 微调器:增加/减少显示项目的大小

Android 微调器:增加/减少显示项目的大小,android,spinner,text-size,Android,Spinner,Text Size,关于如何在spinner中更改条目的“文本大小”,我在StackOverflow中读过很多文章,但似乎没有一篇有用 我正在为galaxy tab 10.1“模板化”我的主布局。 因此,我希望我的物品显示得比手机大得多 好吧,我四处查看,90%的人都在谈论android:textSize=“…”但它对我不起作用(???)我不理解 以下是我的xml定义: <Spinner android:id="@+id/spinner1" android:layout_width="fill

关于如何在spinner中更改条目的“文本大小”,我在StackOverflow中读过很多文章,但似乎没有一篇有用

我正在为galaxy tab 10.1“模板化”我的主布局。 因此,我希望我的物品显示得比手机大得多

好吧,我四处查看,90%的人都在谈论android:textSize=“…”但它对我不起作用(???)我不理解

以下是我的xml定义:

<Spinner
    android:id="@+id/spinner1"
    android:layout_width="fill_parent"
    android:layout_height="75dp"
    android:textSize="30sp"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:drawSelectorOnTop="true"
    android:contentDescription="@string/test"
    android:prompt="@string/choose_one"
    tools:listitem="@android:layout/simple_spinner_item" 
/>

正如您所看到的,我添加了textSize标签,甚至还有textsearance。。。。。。。。没有任何积极的结果。。。。。项目保持小字体,我猜是默认字体

你有主意吗?
谢谢。

你能尝试添加布局\u height=“wrap\u content”?

而不是使用
@android:layout/simple\u spinner\u item
微调器中渲染你的iTen吗?创建你自己的项目布局并设置
填充
以提供选择项目的空间

例如:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TextView>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/spinner_item_text"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:padding="10dp"
    android:text="Example"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textSize="30sp" >
</TextView>

以及使用此布局的微调器:

<Spinner
    android:id="@+id/spinner1"
    android:layout_width="fill_parent"
    android:layout_height="75dp"
    android:drawSelectorOnTop="true"
    android:contentDescription="@string/test"
    android:prompt="@string/choose_one"
    tools:listitem="@layout/your_own_spinner_item" 
/>


好的,还是一样。事实上,它降低了形状/按钮的高度,但选择列表中的小文本大小仍然相同。选择视图还是显示?您是否尝试覆盖适配器中的getDropDownView和/或getView?微调器中列表项的显示。