我的CoordinatorLayout中有一个浮动按钮,当我到达布局结束时,我想隐藏它。
这是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.v4.widget.NestedScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="50dp"
android:clipToPadding="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#EEEEEE"
android:orientation="vertical">
Lots of views here
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<com.software.shell.fab.ActionButton
android:id="@+id/action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="50dp"
android:layout_marginRight="@dimen/fab_margin"
fab:hide_animation="@anim/fab_roll_to_down"
fab:show_animation="@anim/fab_roll_from_down" />
</android.support.design.widget.CoordinatorLayout>
当我向下滚动并到达底部时,我想隐藏浮动按钮,如何确保用户到达布局的末尾?
谢谢