Note that there are some explanatory texts on larger screens.

plurals
  1. PONested Weights in a layout
    primarykey
    data
    text
    <p>I have a layout and i want the components to fill up the remaining part of the screen (using weights). The Listview works perfectly.</p> <p>The 2 buttons at the end work the way i intent them to work also, however i get a warning which says "Nested weights are bad for performance".</p> <p>I think it's a problem because i already used a weight parameter for the Listview, because when i remove the listview the warning is gone.</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="match_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;ListView android:id="@+id/listMessages_messages" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_marginBottom="5dip" android:layout_marginLeft="10dip" android:layout_marginRight="10dip" android:layout_marginTop="10dip" android:layout_weight="1" android:background="#000000" &gt; &lt;/ListView&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" &gt; &lt;Button android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="50" android:visibility="invisible" /&gt; &lt;Button android:id="@+id/btnNewConversation_message" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="5dip" android:layout_weight="50" android:onClick="newConversation" android:text="@string/NewConversation" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    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