Hi I’ve created a listActivity which contain some rows of data and at the bottom of the screen (not the list) I’ve put a button.My problem is that in case that my list is full ,and therefore needs to be scrolled in order for the other rows to be seen,the button seems to be transparent and overlapping the last element of the list.So it doesn’t seem pleasant to the eye.Do you have any suggestion of how to fix such problem?is there any way for my list to leave some space for the bottom button?I wouldn’t like to implement it with footer view.I’ll post the xml file so that you can have a clearer picture.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<DragNDrop.DragNDropListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_weight="1" >
</DragNDrop.DragNDropListView>
<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:alpha="1"
android:drawableLeft="@drawable/back"
android:text="Return" />
</RelativeLayout>
Try this
In a RelativeLayout, elements are placed on the top left corner by default, there’s no need to specify that for the List