How to create 3 equally wide TextView that fills the parent screen

Hi

Could you tell me how I can create 3 equally widescreen TextViews that fill the parent across the screen? I tried to do this, but the width of the TextView is different: it's 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"/> 

+4
source share
1 answer
 <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> 
+8
source

Source: https://habr.com/ru/post/1309465/


All Articles