I'm trying to figure out how to align the dashboardNewsItemDate
to the right, instead of on the left. Currently it shows up immediately next to dashboardNewsItemHeadline
. I thought that putting it within a TableRow
would make the android:layout_gravity="right"
function as I'd like, but that's proven to be wrong.
<TableLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_gravity="center">
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="New Text"
android:id="@+id/dashboardNewsItemHeadline" android:layout_gravity="left"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Text"
android:id="@+id/dashboardNewsItemDate" android:layout_gravity="right" android:autoText="false"/>
</TableRow>
</TableLayout>
In the end, my objective is for content so be displayed like this...
My news title Mar 3
-----------------------------------------
This is a bit of a longer news Jul 2
title and it wraps