Android TableLayout中的相等文本视图
我想在我的应用程序中创建来自a'la tiles metro的统计数据。不幸的是,文本视图的宽度不相等,因为它解决了这个问题 使用和安卓系统:布局重量Android TableLayout中的相等文本视图,android,android-layout,android-tablelayout,Android,Android Layout,Android Tablelayout,我想在我的应用程序中创建来自a'la tiles metro的统计数据。不幸的是,文本视图的宽度不相等,因为它解决了这个问题 使用和安卓系统:布局重量 据我所知,问题可能是因为您将android:layout\u width=“match\u parent”放在了一起,尝试赋予它一个与您的需求相匹配的值。欢迎来到社区,你能详细描述一下你的问题吗?我认为模仿android设计指南中提到的其他UI元素不是一个好主意:这是我的布局:不幸的是,使用TextView时,瓷砖会根据文本的长度进行扩展
据我所知,问题可能是因为您将android:layout\u width=“match\u parent”放在了一起,尝试赋予它一个与您的需求相匹配的值。欢迎来到社区,你能详细描述一下你的问题吗?我认为模仿android设计指南中提到的其他UI元素不是一个好主意:这是我的布局:不幸的是,使用TextView时,瓷砖会根据文本的长度进行扩展
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="4" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="1dp"
android:layout_weight="2"
android:background="#B0B0B0" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="1dp"
android:layout_weight="2"
android:background="#B0B0B0" />
</TableRow>
</TableLayout>