I want to scroll listview.But Listview only scrolls when item of listview exceeded the length of screen .But I want to scroll listview whether listview have one item or ten.I have used this code but it's not working,also have searched a lot but there is no tutorial about this found.So please suggest me how to do this.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingTop="10dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="100" >
<EditText
android:id="@+id/etSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="98"
android:background="@drawable/search_shape"
android:cursorVisible="false"
android:gravity="center"
android:imeOptions="actionSearch"
android:singleLine="true" >
</EditText>
<Button
android:id="@+id/SearchBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="@drawable/search_selector" />
</LinearLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ListView
android:id="@+id/listView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/moreBtn"
android:layout_below="@+id/etSearch"
android:scrollbarStyle="outsideInset"
android:layout_marginTop="10dp" >
</ListView>
<Button
android:id="@+id/moreBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/more_selector"
android:visibility="gone" />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="invisible" />
</RelativeLayout>
</LinearLayout>