Android – How to make height size of table row equals

I have created a table view using table layout and table row, and then i’m facing problem for height size, i want the height size is in equals size looks like standard table. i create it with TableRow dynamically, here is my code :

TableLayout xml.

<android.widget.HorizontalScrollView
    android:id="@+id/hv_cust_prop"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:scrollbarAlwaysDrawHorizontalTrack="false">

    <TableLayout
        android:id="@+id/table_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:measureWithLargestChild="true"
        android:stretchColumns="*"
        android:weightSum="1" />

</android.widget.HorizontalScrollView>

TableRow item xml.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="fill_horizontal|fill_vertical"
    android:gravity="fill_horizontal|center_vertical"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/container_header"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="fill_horizontal|fill_vertical"
        android:background="@drawable/cell_header_bg">

        <TextView
            android:id="@+id/txt_header"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="fill_horizontal|fill_vertical"
            android:layout_margin="2dp"
            android:gravity="center"
            android:maxWidth="150dp"
            android:padding="7dp"
            android:text="Header 1"
            android:textStyle="bold" />
    </FrameLayout>
</LinearLayout>

Generating row Java.

row = new TableRow(getActivity());
                        TableRow.LayoutParams lp = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 1);
                        lp.gravity = Gravity.FILL;
                        row.setLayoutParams(lp);
                        View head = LayoutInflater.from(getActivity()).inflate(R.layout.item_cell_cust_prop, null);

                        FrameLayout container = (FrameLayout) head.findViewById(R.id.container_header);
                        container.setBackgroundResource(R.drawable.cell_bg);

                        TextView txtHeader = (TextView) head.findViewById(R.id.txt_header);
                        try {
                            txtHeader.setText(object.getString("CV_VALUE"));
                        } catch (JSONException e) {
                            txtHeader.setText("erorr");
                            e.printStackTrace();
                        }

                        row.addView(head);
                        tableContent.addView(row);

with tableContent is TableLayout from previous xml.

I want any column height follows the largest height as same as column with wrapped text.

Any help will be appreciate.
Thank you,

add single line true (this is depricated) or maxline 1 to textview as above

  <TextView
            android:id="@+id/txt_header"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="fill_horizontal|fill_vertical"
            android:layout_margin="2dp"
            android:gravity="center"
            android:maxWidth="150dp"
            android:padding="7dp"
            android:text="Header 1"
            android:textStyle="bold"
            android:maxLines="1"
            android:singleLine="true" />

Edit

alternatively try to set android:weightSum=”1″ to Linearlayout and set android:layout_weight=”1″ to FrameLayout like below

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_horizontal|fill_vertical"
android:gravity="fill_horizontal|center_vertical"
android:orientation="vertical"
android:weightSum="1">

<FrameLayout
    android:id="@+id/container_header"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="fill_horizontal|fill_vertical"
    android:background="@drawable/cell_header_bg"
    android:layout_weight="1">

    <TextView
        android:id="@+id/txt_header"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="fill_horizontal|fill_vertical"
        android:layout_margin="2dp"
        android:gravity="center"
        android:maxWidth="150dp"
        android:padding="7dp"
        android:text="Header 1"
        android:textStyle="bold" />
</FrameLayout>