Spinner Android中的半截文字

Nam*_*ves 5 layout android text resize spinner

我在Android上有一个布局,但是如果我改变微调器的大小我的文本被剪切,我尝试自定义背景到微调器并尝试布局默认但不解决.

我的XML:

            <Spinner
                android:id="@+id/spinner2"
                android:layout_width="wrap_content"
                android:layout_height="40px"
                android:layout_marginRight="2dip"
                android:layout_weight="1"
                android:background="@drawable/spinner_custom"
                android:gravity="left|center_vertical"
                android:paddingLeft="4dip"
                android:textSize="16px" />

            <Spinner
                android:id="@+id/spinner2"
                android:layout_width="wrap_content"
                android:layout_height="40px"
                android:layout_marginRight="2dip"
                android:layout_weight="1"
                android:background="@drawable/spinner_custom"
                android:gravity="left|center_vertical"
                android:paddingLeft="4dip"
                android:textSize="16px" />
        </TableRow>
Run Code Online (Sandbox Code Playgroud)

我怎么能解决它?

自定义背景的屏幕:

http://img814.imageshack.us/img814/8284/spinner.jpg

在此输入图像描述

Mat*_*ris 3

Spinner 的自定义背景是图像还是 xml 文件?如果它是 xml 可绘制文件,请检查您是否没有在底部使用填充。

还可以尝试将layout_height值更改为wrap_content而不是设置为40px,这可能会导致问题。