为什么我的Spinner显示列表上升而不是android中的downSide?

时间:2014-07-23 11:14:49

标签: android android-layout drop-down-menu android-spinner

我在我的android活动中使用了2个微调器,一个用于国家,另一个用于状态,country spinner将数据显示为dropDown List(向下),但状态微调器向我提供了数据,如图所示。我想将它显示为乡村微调器(向下),请帮助我。我的微调器代码如下: 的

 <Spinner
                android:id="@+id/spr_country"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/tv_cntry_id"
                android:layout_centerHorizontal="true"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:gravity="center"
                android:spinnerMode="dropdown" />

            <Spinner
                android:id="@+id/spr_states"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/spr_country"
                android:layout_centerHorizontal="true"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="10dp"
                android:gravity="center"
                android:spinnerMode="dropdown" />

Upside spinner

1 个答案:

答案 0 :(得分:0)

Spinner没有足够的空间来显示微调器弹出窗口。 Android系统会自动弹出它。

enter image description here

相关问题