I've got a simple view with two TextViews inside a LinearLayout:
see screenshot:
I want something like:
| Left <space here> Right|
But I get
| LeftRight <space here> |
The upshot is I want the "Left" text on the left and the "Right" text on the right, but they both get bunched up on the left. I've tried the plain old "gravity" attribute and that does not work either. Any suggestions?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:background="#FFFFFF">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Left"
android:textColor="#000000"
android:textSize="7pt"
android:layout_gravity="left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Right"
android:textColor="#000000"
android:textSize="7pt"
android:layout_gravity="right" />
</LinearLayout>
see screenshot:
I want something like:
| Left <space here> Right|
But I get
| LeftRight <space here> |
The upshot is I want the "Left" text on the left and the "Right" text on the right, but they both get bunched up on the left. I've tried the plain old "gravity" attribute and that does not work either. Any suggestions?