Note that there are some explanatory texts on larger screens.

plurals
  1. POTableLayout formatting loss after device rotation
    primarykey
    data
    text
    <p>I'm seeing a strange issue with a TableLayout after the device is rotated from either orientation. If you load the view in either portrait or landscape mode, the table loads fine. But once you rotate the device, the columns collapse to just fit their width. I would expect that after rotation, the columns would still stretch to fit the width of the screen. Any ideas on what can be done to resolve this? Screenies and layout code below.</p> <p>Before Rotation:</p> <p><a href="http://dl.dropbox.com/u/334957/normal_from_portrait.png" rel="nofollow noreferrer">before rotation http://dl.dropbox.com/u/334957/normal_from_portrait.png</a></p> <p>After Rotation:</p> <p><a href="http://dl.dropbox.com/u/334957/after_rotate_portrait.png" rel="nofollow noreferrer">after rotation http://dl.dropbox.com/u/334957/after_rotate_portrait.png</a></p> <p>Table Layout:</p> <pre><code> &lt;TableLayout android:id="@+id/dataTable" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:layout_below="@id/chart" android:stretchColumns="*" android:shrinkColumns="*" android:padding="6dip" &gt; &lt;/TableLayout&gt; </code></pre> <p>Table Row:</p> <pre><code> &lt;TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;TextView android:id="@+id/col1" android:layout_marginRight="2dip" android:textColorLink="#FF21759b" android:text="Column 1" android:padding="4dip" android:textColor="#FF464646"/&gt; &lt;TextView android:id="@+id/col2" android:text="Column 2" android:textColor="#FF464646" android:padding="4dip"/&gt; &lt;/TableRow&gt; </code></pre> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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.
 

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