Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Change your LinearLayout to "wrap_content" on layout_height</p> <pre><code>&lt;LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_weight="1" android:layout_height="wrap_content"&gt; </code></pre> <p>Also, I don't know why you have a LinearLayout inside a LinearLayout. Since this xml is only for individual rows. Each row will be a horizontal LinearLayout, the second one being unnecessary as ListView automatically lists rows vertically.</p> <p>Finally, the root LinearLayout should use minHeight for the default Item Height, not layout_height.</p> <pre><code>android:minHeight="?android:attr/listPreferredItemHeight" </code></pre> <p>This should be your xml file (unless you really need the second LinearLayout for some odd reason)</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight" android:padding="0dip"&gt; &lt;TextView android:id="@+id/row_title" android:layout_width="fill_parent" android:layout_height="wrap_content" style="bold"/&gt; &lt;TextView android:id="@+id/row_subtitle" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;TextView android:id="@+id/row_postcode_city" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;/LinearLayout&gt; </code></pre>
 

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