I am developing an Android application that mainly works with listview . But the problem with the Floating Action Button is related to the Long ListView . My problem is the following.
If the list view has only a few items. Floating item .
This is a screenshot.

As you can see above, the Floating Action Button can still be seen. But when the listview has so many elements and becomes excessive for the screen, the Floating Action Button not visible.
This is a screenshot of Long ListView

For the second screenshot, it can no longer be scrolled down .
What I want to achieve, I want the floating bottom to always be in the lower right corner of the screen above the listview . Like a fixed position in HTML and CSS .
I want a Floating Action Button always here, no matter how high the listview

This is my layout file.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ListView android:dividerHeight="@dimen/list_item_divider_height" android:padding="@dimen/list_padding" android:divider="@color/whitesmoke" android:id="@+id/listview_podcast_list" android:layout_width="match_parent" android:layout_height="wrap_content"></ListView> <TextView android:textSize="17dp" android:textStyle="bold" android:textColor="@color/black" android:textAlignment="center" android:id="@+id/tf_no_records" android:layout_width="match_parent" android:layout_height="wrap_content" /> <android.support.design.widget.FloatingActionButton android:id="@+id/stop_podcast_button" android:background="@color/colorPrimary" android:src="@android:drawable/ic_dialog_email" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end"/> </LinearLayout>
So, please, how can I fix my code to achieve it. Help me please. Thanks.
android listview android-fab
Wai yan hein
source share