Android XML - how to get items aligned far left, center, and far right
Posted
by 68060
on Stack Overflow
See other posts from Stack Overflow
or by 68060
Published on 2010-04-26T01:32:15Z
Indexed on
2010/04/26
1:33 UTC
Read the original article
Hit count: 381
Hi, I have this XML code which generates a button, a textview and another button, How do I go about getting the button to appear in far left, the textview in the center and the last button on the far right?
< ?xml version="1.0" encoding="utf-8"?>
< LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<Button android:id="@+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel">
</Button>
<TextView android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Place">
</TextView>
<Button android:id="@+id/Button03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save">
</Button>
© Stack Overflow or respective owner