Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.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个宽度相等的文本视图,在屏幕上填充父视图_Android - Fatal编程技术网

Android 如何创建3个宽度相等的文本视图,在屏幕上填充父视图

Android 如何创建3个宽度相等的文本视图,在屏幕上填充父视图,android,Android,嗨 你能告诉我如何创建3个同样宽的文本视图,在屏幕上填充家长吗?我试过这样做,但是文本视图的宽度不同:它是149、89、89 <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="*"

你能告诉我如何创建3个同样宽的文本视图,在屏幕上填充家长吗?我试过这样做,但是文本视图的宽度不同:它是149、89、89

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent" android:layout_height="wrap_content"
     android:stretchColumns="*"
     android:shrinkColumns="*">



<TextView android:id="@+id/t1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_column="0"/>

<TextView android:id="@+id/t2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_column="1"/>

<TextView android:id="@+id/t3"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_column="2"/>
<LinearLayout
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    >
    <TextView
        android:layout_height="wrap_content"
        android:layout_width="0dp"
        android:layout_weight="1"
    />
    <TextView
        android:layout_height="wrap_content"
        android:layout_width="0dp"
        android:layout_weight="1"
    />
    <TextView
        android:layout_height="wrap_content"
        android:layout_width="0dp"
        android:layout_weight="1"
    />
</LinearLayout>