Skip to content Skip to sidebar Skip to footer

How To Add Button In Footer Below Listview In Layout With Fragment

How to add button in footer below listview in layout with fragment. I have code as below: In fragment java. ListView listview; Button button; public View onCreateView(LayoutInfla

Solution 1:

You missed layout_height in your /res/layout/footer_category.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/footerCategory"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <Button
        android:id="@+id/loadMore"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Load More" />

</LinearLayout>

Post a Comment for "How To Add Button In Footer Below Listview In Layout With Fragment"