문제

I need to display the Spinner below this TextView "Type of Mill".

Now the Spinner appears to the right of the Textview(Image 1) but i need it to appear below the textview in Full width of the device(Image 2).

  1. enter image description here

  2. enter image description here

Edit: Thank you

도움이 되었습니까?

해결책

Wrap the textview and your spinner inside LinearLayout vertical so that it'll appear as you want. Something like this,

    <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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top