I am working on a project which has a custom listview.Since the getView()
method of the baseadapter kept being called thrice the number of rows in the listview,someone suggested that i change the width and height of the listview to match_parent
.But now the problem is that there is a button below the listview,which is not visible now.How do i make it visible.
The post i was referring to:custom listview adapter getView method being called multiple times, and in no coherent order
my xml file:
<?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"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="LIST OF TASKS" />
<ListView
android:id="@+id/list_tasks_final"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="50px"
>
</ListView>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/list_tasks_final"
android:layout_centerHorizontal="true"
android:text="SUBMIT JOB"
android:id="@+id/btnjobsubmit"
/>
</RelativeLayout>
The issue is that the button is not visible now.How to make it visible?