Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A screenshot of what you're seeing will help.</p> <p><strong>ImageView not filling entire table</strong></p> <p>In the tablelayout properties, try specifying <code>android:stretchColumns="*"</code> which will allow the columns to stretch to fill the table. I believe if all the columns are allowed to stretch (as the * denotes), then they will stretch so they are even (take up the same amount of space).</p> <p><strong>Button being stretched</strong></p> <p>You specified <code>layout_width="wrap_content"</code> which normally would achieve what you want, but in the case of Table Layout, you can't specify a width. This is from the TableRow android documentation:</p> <pre><code>The children of a TableRow do not need to specify the layout_width and layout_height attributes in the XML file. TableRow always enforces those values to be respectively MATCH_PARENT and WRAP_CONTENT. </code></pre> <p>So you need to put another container in the Table Row, put your button in that container and set your button to wrap &amp; align to the middle. Something like this should work:</p> <pre><code>&lt;TableRow ...&gt; &lt;!-- Create a container --&gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;!-- Place button inside Container --&gt; &lt;Button android:layout_width="wrap_content" android:layout_height="wrap_content" &lt;!-- Place button in the middle of the container --&gt; android:layout_gravity="center" .../&gt; &lt;/LinearLayout&gt; &lt;/TableRow&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload