I was able to achieve this with the following XML,
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="left"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".60" />
<TextView
android:text="right"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".40" />
</LinearLayout>
You can replace the TextView with EditText or Button or whatever elements that fit your needs..
Note: Make sure to set thelayout_width
to0dp
or your views may not be scaled properly.
No comments:
Post a Comment