在文本视图下,微调器不显示为全宽

时间:2014-04-28 10:35:14

标签: android android-layout android-spinner

我需要在TextView" Mill of Type"下面显示Spinner。

现在,Spinner出现在Textview(图像1)的右侧,但是我需要它出现在设备全宽度的文本视图下方(图2)。

  1. enter image description here

  2. enter image description here

  3. 编辑:谢谢

1 个答案:

答案 0 :(得分:1)

将textview和您的微调器在LinearLayout中垂直包裹,以便它可以根据需要显示。 像这样的东西,

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="44dp"
        android:text="Type of Mill" />

    <Spinner
        android:id="@+id/spinner1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</LinearLayout>