Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid app buttons outside of Listview
    text
    copied!<p>I have a listview i am implementing by calling a new activity. The layout is as follows:<br></p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_centerHorizontal="true" android:orientation="vertical" &gt; &lt;LinearLayout android:id="@+id/listWrap" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/testbutton" android:layout_alignParentTop="true" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/item_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="2dp" android:textAppearance="?android:attr/textAppearanceMedium" android:textSize="20dp" &gt; &lt;/TextView&gt; &lt;ListView android:id="@id/android:list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:drawSelectorOnTop="false" &gt; &lt;/ListView&gt; &lt;TextView android:id="@+id/item_subtitle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="2dp" android:textSize="13dp" &gt; &lt;/TextView&gt; &lt;/LinearLayout&gt; &lt;Button android:id="@+id/testbutton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:text="@string/hello" /&gt;&lt;/RelativeLayout&gt; </code></pre> <p>When the activity loads the button is at the bottom but once the list is loaded instead of the list fields the button is appearing in every list item. How can I make this button stay at the bottom and have a list above? </p>
 

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