Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid layout bug in 1.6 vs 2.2
    primarykey
    data
    text
    <p>I have a strange "bug" in my layout file. I am new to Android, so perhaps I am missing something. I stripped the example down to the bare minimum to ease your understanding of the problem:</p> <p>I have a simple list, with a ListAdapter, which should display a line of text with an icon next to it. The icon should be centered vertically if the text is higher then the icon.</p> <p>If I leave the attribute "center" out, the sample works (the list item gets the correct heigth), but as soon as I include it, I get a bug.</p> <p>Any ideas on how to solve this issue? (btw, I need the tableLayout for streching columns, not sure if there is another way for this)</p> <p>The XML source for the row looks like this:</p> <pre><code>&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1"&gt; &lt;TableRow&gt; &lt;TextView android:height="30dp" android:width="30dp" android:background="@color/blue" android:layout_gravity="center_vertical" /&gt; &lt;TextView android:layout_height="wrap_content" android:text="TextView" android:textSize="22dp" android:layout_width="120dp" android:layout_gravity="left" android:background="@color/yellow" android:id="@+id/simple_list_row_text1"/&gt; &lt;/TableRow&gt; </code></pre> <p></p> <p>The desired result (which works on higher versions of android without any problems) is:</p> <p><img src="https://i.stack.imgur.com/QpFUS.png" alt="working"></p> <p>And the image on Android 1.6</p> <p><img src="https://i.stack.imgur.com/A08aI.png" alt="enter image description here"></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.
    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