Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/211.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android上每个单元格中都有3×3的网格和图像按钮_Android_Layout_Runtime_Tablerow - Fatal编程技术网

Android上每个单元格中都有3×3的网格和图像按钮

Android上每个单元格中都有3×3的网格和图像按钮,android,layout,runtime,tablerow,Android,Layout,Runtime,Tablerow,我想有一个3列3行的网格,每个单元格(单元格的中心)有一个图像按钮 我尝试使用gridview,但无法确定行数。 我尝试使用一个tablelayout和3个tablerows,但在运行时无法更改宽度/高度 有什么想法吗?如果您使用的是表格布局,只需在每个图像按钮上执行以下操作: this.setPadding(0, 0, 0, 0); this.setScaleType(ScaleType.CENTER_INSIDE);

我想有一个3列3行的网格,每个单元格(单元格的中心)有一个图像按钮

我尝试使用gridview,但无法确定行数。 我尝试使用一个tablelayout和3个tablerows,但在运行时无法更改宽度/高度


有什么想法吗?

如果您使用的是表格布局,只需在每个图像按钮上执行以下操作:

this.setPadding(0, 0, 0, 0);
this.setScaleType(ScaleType.CENTER_INSIDE);