【发布时间】:2017-10-03 07:16:56
【问题描述】:
我现在正在尝试构建一个列表应用程序,我需要在同一行中对齐按钮和文本,但由于我对 android studio 和 Java 非常陌生,我遇到了麻烦。我发现的任何指南都已过时 我的代码在下面
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1"
android:strechColumns="1">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false">
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Job 1"
/>
</TableRow>
<ToggleButton
android:id="@+id/button1"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:onClick=""
android:text="test text"
/>
</TableLayout>
任何帮助将不胜感激
【问题讨论】:
标签: java android android-tablelayout