title: Most efficient way to set column width in table layout?
body: <p>I'm working on an real estate application. </p>
  
  <p>On the detail page of a house I display a lot of info about the house.
  But I'm getting some warnings that my layout takes too long to render so I'm looking to improve my layout. </p>
  
  <p>This is the part of my layout I want to improve:</p>
  
  <pre><code>&lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:paddingLeft="12dp"
          android:paddingRight="12dp"&gt;
  
          &lt;!-- General --&gt;
          &lt;include
              layout="@layout/view_property_properties_general"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  
          &lt;!-- Interior --&gt;
          &lt;include
              layout="@layout/view_property_properties_interior"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  
          &lt;!-- Financial --&gt;
          &lt;include
              layout="@layout/view_property_properties_financial"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  
          &lt;!-- Terrain --&gt;
          &lt;include
              layout="@layout/view_property_properties_terrain"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  
          &lt;!-- Energy --&gt;
          &lt;include
              layout="@layout/view_property_properties_energy"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This is what the general properties layout looks like (I'm using a expandable panel so the user can show/hide):</p>
  
  <pre><code>&lt;widgets.ExpandablePanel
  android:id="@+id/general_container"
  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:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical"
  app:content="@+id/content"
  app:handle="@+id/tv_general_title"&gt;
  
  &lt;TextView
      android:id="@+id/tv_general_title"
      style="@style/property_detail_title_style"
      android:text="@string/general_properties"/&gt;
  
  &lt;TableLayout
      android:id="@id/content"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/estate_type"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_estate_type"
              style="@style/property_detail_value_style"
              tools:text="House"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/total_living_area"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_liveable_area"
              style="@style/property_detail_value_style"
              tools:text="145 m²"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/number_of_facades"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_number_of_facades"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/number_of_living_units"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_number_of_living_units"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/number_of_floors"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_number_of_floors"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/number_of_extra_buildings"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_number_of_extra_buildings"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/parking_spots_inside"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_parking_spots_inside"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/parking_spots_outside"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_parking_spots_outside"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/condition_of_the_building"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_condition_of_the_building"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/length_on_streetside"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_width_on_streetside"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/year"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_build_year"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/investment_property"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_investment_property"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/public_sale_property"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_public_sale"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/newbuild"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_newbuild"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  
      &lt;TableRow&gt;
  
          &lt;TextView
              style="@style/property_detail_label_style"
              android:text="@string/seasight"/&gt;
  
          &lt;TextView
              android:id="@+id/tv_seasight"
              style="@style/property_detail_value_style"/&gt;
  
      &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>These are the styles:</p>
  
  <pre><code> &lt;style name="property_detail_label_style"&gt;
      &lt;item name="android:textSize"&gt;@dimen/between_small_and_medium_fontsize&lt;/item&gt;
      &lt;item name="android:textColor"&gt;@color/gray_6&lt;/item&gt;
      &lt;item name="android:layout_width"&gt;0dp&lt;/item&gt;
      &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:layout_weight"&gt;0.6&lt;/item&gt;
      &lt;item name="android:paddingRight"&gt;10dp&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="property_detail_value_style"&gt;
      &lt;item name="android:textSize"&gt;@dimen/between_small_and_medium_fontsize&lt;/item&gt;
      &lt;item name="android:textColor"&gt;@color/gray_6&lt;/item&gt;
      &lt;item name="android:layout_width"&gt;0dp&lt;/item&gt;
      &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt;
      &lt;item name="android:layout_weight"&gt;0.4&lt;/item&gt;
      &lt;item name="android:gravity"&gt;left|center_vertical&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>As you can see I'm giving the 'label' TextView and the 'value' TextView a weight. I know that weights are expensive but what are the alternatives ?   </p>
  
  <p>This is what it looks like: </p>
  
  <p><img src="https://i.stack.imgur.com/Sg98P.png" alt="enter image description here"></p>