Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I assume you tried to say layout_weight instead of layout_gravity because it doesn't do that. </p> <p>Try removing the first layout_weightSum in the listview and replace the weights of each column to be like this:</p> <p>.25 in the first column .25 in the second column 1 in the third column. </p> <p>The number one will make the column stretch to fill the gap</p> <p>EDIT:</p> <p>I meant this:</p> <p>What I understood is that you want to create a linear layout with three columns. Two of those columns should take half of the screen space where the third one should stretch to fill the other half. </p> <p>This linear layout should be the layout of the single item of each item of the listview, is that what you want?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;!-- row.xml --&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:paddingTop="4dip" android:paddingBottom="6dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"&gt; &lt;TextView android:id="@+id/one" android:layout_width="0dip" android:layout_weight=".25" android:textColor="#FFFFFF" android:text="One" android:layout_height="wrap_content"/&gt; &lt;TextView android:id="@+id/two" android:layout_width="0dip" android:layout_weight=".25" android:textColor="#FFFFFF" android:text="Two" android:layout_height="wrap_content"/&gt; &lt;TextView android:id="@+id/three" android:layout_width="0dip" android:layout_weight="1" android:textColor="#FFFFFF" android:text="Three" android:layout_height="wrap_content"/&gt; &lt;/LinearLayout&gt; </code></pre> <p>This is one of my own:</p> <pre><code>?xml version="1.0" encoding="utf-8"?&gt; &lt;!-- row.xml --&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/ListViewItem" android:orientation="horizontal"&gt; &lt;TextView android:id="@+id/currencyName" style="@style/ListViewItemSubtitle" android:layout_width="110dip" android:layout_height="wrap_content" android:layout_weight="1"/&gt; &lt;TextView android:id="@+id/currencyCode" style="@style/ListViewItemSubtitle" android:layout_width="60dip" android:layout_height="wrap_content" android:layout_weight=".2"/&gt; &lt;TextView android:id="@+id/currencyExchangeRate" style="@style/ListViewItemSubtitle" android:layout_width="90dip" android:layout_height="wrap_content" android:layout_weight=".25"/&gt; &lt;/LinearLayout&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. 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