我的android spinner没有';I don’我看起来不好

我的android spinner没有';I don’我看起来不好,android,android-layout,spinner,Android,Android Layout,Spinner,我需要定制我的android微调器。为此,我创建了这个微调器_selector.xml: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/spinne

我需要定制我的android微调器。为此,我创建了这个微调器_selector.xml:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_window_focused="false" android:state_enabled="true"
        android:drawable="@drawable/spinner_default" />
    <item
        android:state_window_focused="false" android:state_enabled="false"
        android:drawable="@drawable/spinner_default" />
    <item
        android:state_pressed="true"
        android:drawable="@drawable/spinner_pressed" />
    <item
        android:state_focused="true" android:state_enabled="true"
        android:drawable="@drawable/spinner_focused" />
    <item
        android:state_enabled="true"
        android:drawable="@drawable/spinner_default" />
    <item
        android:state_focused="true"
        android:drawable="@drawable/spinner_focused" />
    <item
        android:drawable="@drawable/spinner_default" />
</selector>

然后设置微调器的背景:
android:background=“@drawable/spinner\u selector”

问题是旋转器看起来非常可怕。之前:

之后:

当它被按下时,看起来是这样的:

我使用的图像如下:


如何解决这个问题?我对
微调器
按钮
编辑文本
也有这个问题。我真的需要定制这些组件。请帮忙。欢迎任何想法。

问题似乎是旋转器的高度和宽度,您需要更改它,
您可以提供任何静态值,也可以使用将图像大小设置得更大的包裹内容。

问题似乎是微调器的高度和宽度,您需要更改它,
您可以提供任何静态值,也可以使用将图像大小设置得更大的换行内容。

要将文本向右对齐一点,您可以在XML中使用
填充
,请像这样为微调器提供填充,例如:
android:padding=5dp

要将文本向右对齐一点,您可以在XML中使用
padding
请像这样给微调器添加填充,例如:
android:padding=5dp

使用九个补丁图片这里是如何创建一个,也提供微调器的XML代码,并检查它的宽度、高度属性我有这个:android:layout\u width=“fill\u parent”android:layou\u height=spinner的“包装内容”Use nine patch image这里是如何创建一个,提供spinner的xml代码,并检查其宽度和高度属性我有以下内容:android:layout\u width=“fill\u parent”android:layout\u height=“包装内容“对斯宾纳来说,它帮助我整理了课文。谢谢我将高度设置为图像作为背景的高度,这有助于我安排文本。谢谢我将高度设置为图像作为背景的高度。