0

I have attached footer after setAdapter, now it works good from KitKat but it does not work before KitKat versions.

The solution I got is from this SO question is:

  1. addFooterView(footer);
  2. setAdapter(adapter);
  3. removeFooterView(footer);

but I wanted to attach footer view after setAdapter.

Community
  • 1
  • 1
Faisal Shaikh
  • 3,900
  • 5
  • 40
  • 77

1 Answers1

0

Why not displaying a view over the listview.

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <SomeView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignBottom="@+id/recyclerView" />

</RelativeLayout>
Robin Dijkhof
  • 18,665
  • 11
  • 65
  • 116