Как добавить вид на TableRow
справа налево? режим по умолчанию - слева направо. Я пробовал android:gravity="right"
и android:layout_gravity="right"
внутри обоих TableLayout
и TableRow
но не работал. , например:Как сделать TableRow справа налево
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:layoutDirection="rtl"
android:stretchColumns="*" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:gravity="right"
android:layoutDirection="rtl">
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Medium Text" />
</TableRow>
</TableLayout>
результат button1 слева и textView1 на правом, но мне нужно наоборот.
Пожалуйста, ваш код XML, и я могу помочь. – furkick
Я делаю это динамически –
Вы имеете в виду прагматично в Java? – furkick