I have a button and a expand list above this button , when the list is expanded the button below it disappears . how to make this button in fixed location?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include layout="@layout/ads_bar" ></include>
<TextView
android:text="Level 1:"
android:textSize="20dp"
android:id="@+id/TextView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></TextView>
<TextView
android:text="lorem ispum something about this level ..... :)"
android:textSize="16dp"
android:id="@+id/TextView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></TextView>
<ExpandableListView
android:id="@+id/listView"
android:scrollbars="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></ExpandableListView>
<include
android:layout_alignParentBottom="true"
layout="@layout/quick_links_bar"></include>
</LinearLayout>
where quick_links_bar represents button !
Sounds like you want the
quick_links_barlayout to always stay at the bottom? You’ll need to useRelativeLayoutfor that.Wrap your whole layout in a RelativeLayout and move your quick links bar layout outside of the LinearLayout and set the property
android:layout_alignParentBottom="true"on it. For this next bit, you’ll need to assign an id to your quick links bar. On your LinearLayout, set the propertyandroid:layout_above="@id/quicklinksbarid". Make sure your quick links bar include statement is above the LinearLayout.