I have read this question Set equal width of columns in table layout in Android
After seeing the answer, it is true that the columns take the same sizes, but when I replace two TextView with an EditText, the same sizes do not appear anymore. How can I solve that?
This is the modified code:
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_calendar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:stretchColumns="*"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_calendar">
<TableRow android:layout_width="0dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity=""
android:text="table header1"
android:textSize="10dip"
android:textStyle="bold" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="table header3"
android:textSize="10dip"
android:textStyle="bold" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="table header4"
android:textSize="10dip"
android:textStyle="bold" />
</TableRow>
</TableLayout>