How can I create a ListView
with fixed header and footer?
I don\'t want the header/footer to scroll with the items in the ListView
.
we can set header and footer in this way also, i am setting header layout above listview and in same way we cans et footer below listview
<LinearLayout
android:id="@+id/ly_header"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/app_theme_color"
android:orientation="horizontal">
<include layout="@layout/header_icuc"/>
</LinearLayout>
<ListView
android:id="@+id/lv_contacts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/ly_header"
android:background="#F3F4F6"
android:divider="@drawable/contact_list_divider"
android:dividerHeight="2dp"
android:scrollbars="none" />