TableLayout中的Android ImageButton
我需要Java代码中的TableLayout和ImageButton,但有一个问题,所以我尝试在xml中这样做,但我不理解为什么第一个按钮会这样做TableLayout中的Android ImageButton,android,tablelayout,imagebutton,Android,Tablelayout,Imagebutton,我需要Java代码中的TableLayout和ImageButton,但有一个问题,所以我尝试在xml中这样做,但我不理解为什么第一个按钮会这样做 <TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <TableRow> &l
<TableLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TableRow>
<ImageButton
android:src="@drawable/blankc4"
/>
<ImageButton
android:background="@android:color/white"
android:src="@drawable/blankc4"
/>
</TableRow>
<TableRow>
<ImageButton
android:background="@android:color/white"
android:src="@drawable/blankc4"
/>
<ImageButton
android:background="@android:color/white"
android:src="@drawable/blankc4"
android:layout_column="2"
/>
</TableRow>
</TableLayout>
输出
有什么我遗漏的吗。如果不是,该输出的解释是什么
我想要相同的按钮,只有和没有背景色。如何制作。除第一个外,每一个都有一个背景设置
如果您只查找作为按钮的图像,请不要使用源标记,而是将背景设置为所需的图像。我必须在运行时更改背景颜色。