I have code like this:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
>
<LinearLayout
android:id="@+id/relativeLayoutforPRICE"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView$_points_to_win"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Points to win"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Spinner
android:id="@+id/spinner$_points_to_win"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
Currently it looks like that:
I would like to move Spinner to the right side of the LinearLayout. I tried to use:
android:gravity="right"
and
android:gravity="end"
and
android:layout_gravity="right"
and
android:layout_gravity="end"
but it didn't help. Is there any other option to move it to the right?
What's also important I want to keep parent layout as Linear (oriented vertically) and current layout as Linear (oriented horizontally).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…