title: Trying to get table rows equal height in table layout
body: <p>I am using a TableLayout where each table row will consist of three cells which will each display an image. I want each imageview/cell to be of equal height and width. The problem is, the tablerow height by default wraps to the size of the imageview/cell with the largest height, so the rows are not equal height.</p>
  
  <pre><code>        TableLayout tableLayout = (TableLayout) getActivity().findViewById(R.id.tableLayout);
              TableRow.LayoutParams lp = new TableRow.LayoutParams(tableLayout.getWidth()/3, ViewGroup.LayoutParams.WRAP_CONTENT, 0.3f);
              TableRow tableRow = new TableRow(getActivity().getApplicationContext());
              lp.setMargins(1,1,1,1);
              tableRow.setLayoutParams(lp);
              imageView.setImageBitmap(b);
              imageView.setLayoutParams(lp);
              imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
              tableRow.addView(imageView);
              tableLayout.addView(tableRow);
  </code></pre>
  
  <p>Here is the xml</p>
  
  <pre><code>            &lt;TableLayout
                  android:id="@+id/tableLayout"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:stretchColumns="*"
                  android:weightSum="1"
                  app:layout_constrainedHeight="false"
                  app:layout_constraintHeight_percent="0.5"
                  app:layout_constraintWidth_percent="1"&gt;
              &lt;/TableLayout&gt;
  </code></pre>
  
  <p>Here is what it looks like currently
  <a href="https://i.stack.imgur.com/UZqtj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UZqtj.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/vGt6H.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vGt6H.jpg" alt="enter image description here"></a></p>