Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/184.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桌面布局高度问题_Android_Android Tablelayout - Fatal编程技术网

Android桌面布局高度问题

Android桌面布局高度问题,android,android-tablelayout,Android,Android Tablelayout,我有一张桌子,但由于单元格的内容不同,它们的高度也不同 (很抱歉照片不好) 这看起来很糟糕 <TextView android:text="@string/row7_2" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1" android:textSize="12sp" android:background="@d

我有一张桌子,但由于单元格的内容不同,它们的高度也不同

(很抱歉照片不好)

这看起来很糟糕

<TextView
    android:text="@string/row7_2"
    android:layout_height="wrap_content"
    android:layout_width="0dp"
    android:layout_weight="1"
    android:textSize="12sp"
    android:background="@drawable/cell_shape"/>


由于我已经在使用
layout\u weight
这不是我解决此问题的选项。因此,如果有任何帮助,我们将不胜感激。无论单元格的内容如何,我如何确定单元格的高度?

当您使用换行内容时,文本越大,空间越大

android:layout_height="20 dp"
这里仅以20dp为例。您可以使用更大的尺寸来匹配您的单元格