0
我正在使用tableLayout来放置按钮。现在第一个按钮在我提供的图片中可见,但是您看不到它旁边的按钮。这个按钮只用于我使用'android:layout_span =“2”'的那个按钮。因为我想要那个按钮占据该行的2列。但由于某种原因,它然后消失,行(蓝色选择)突然有更高的高度。屏幕上跨度消失的按钮
有谁知道如何解决这个问题?
activity_main.xml中
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/TableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_span="2"
android:text="Button" />
</TableRow>
</TableLayout>