dashboardNewsItemDate
을 왼쪽이 아닌 오른쪽으로 정렬하는 방법을 알아 내려고합니다. 현재는 dashboardNewsItemHeadline
옆에 즉시 나타납니다. TableRow
안에 넣으면 android:layout_gravity="right"
기능을 원하는대로 작동시킬 수 있다고 생각했지만 잘못된 것으로 입증되었습니다. 결국 텍스트를 오른쪽으로 정렬하는 방법
<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>
, 내 목표는 대신
My news title Mar 3
-----------------------------------------
This is a bit of a longer news Jul 2
title and it wraps
작동하지 않았다 : - \ – Webnet