我正在开发一个包含一些文本视图和按钮的 Android 应用程序。
我需要将 Button 放在文本视图之后。当我的 TextView 是运行良好的单行时。但是当使用多行文本视图时,我的按钮被放置在第 1 行的末尾。
如何将按钮放置在正确的位置(在文本视图的最后一行之后)?
编辑后:
这是我的 xml,我在代码中使用它并动态生成它。
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:shrinkColumns="1"
android:stretchColumns="1" >
<TableRow android:id="@+id/tableRow1" >
<Button
android:id="@+id/ayehPlace_btnCounter"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ayeh_counter"
android:text="" />
<TextView
android:id="@+id/ayehPlace_txtAyeh"
android:layout_width="wrap_content"
style="@style/ayehPlace_txt"
android:layout_height="wrap_content"
android:text="" />
</TableRow>
</TableLayout>