I am having problems creating a table layout with 4 columns, that span horizontally.
I want my Row to look like this:
AAPL | 200.00 | Image Divider | 1.53 (+1.5%)
I want the 200.00 to be right aligned, as well as the 1.53(+1.5%).
<?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:background="@drawable/stocks_gradient" android:orientation="horizontal">
<TableLayout android:layout_width="wrap_content"
android:layout_toLeftOf="@+id/priceText" android:layout_height="wrap_content"
android:id="@+id/TableLayout01">
<TableRow android:layout_width="wrap_content"
android:layout_below="@+id/nameText" android:id="@+id/TableRow01"
android:layout_height="wrap_content"></TableRow>
<TextView android:id="@+id/nameText" android:layout_height="wrap_content"
android:padding="5dip" android:layout_alignParentLeft="true"
android:text="Symbol" android:textStyle="bold" android:textSize="24sp"
android:layout_width="100dp" android:textColor="#4871A8" />
<TextView android:id="@+id/priceText" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:padding="5dip"
android:layout_toRightOf="@+id/nameText" android:gravity="right"
android:text="100" android:textStyle="bold" android:textSize="24sp"
android:textColor="#4871A8" />
<ImageView android:layout_toLeftOf="@+id/changeText"
android:id="@+id/verticalDivider" android:background="@drawable/vertical_divider"
android:layout_width="wrap_content" android:layout_height="48dp"></ImageView>
<TextView android:id="@+id/changeText" android:layout_height="wrap_content"
android:layout_toRightOf="@+id/priceText" android:gravity="right"
android:textSize="18sp" android:text="3.07(+1.08%)" android:padding="12dip"
android:layout_width="fill_parent" />
</TableLayout>