Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/208.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android-当到达CoordinatorLayout活动结束时,如何隐藏浮动按钮_Android - Fatal编程技术网

android-当到达CoordinatorLayout活动结束时,如何隐藏浮动按钮

android-当到达CoordinatorLayout活动结束时,如何隐藏浮动按钮,android,Android,我的Coordinator布局中有一个浮动按钮,当我到达布局的末尾时,我想隐藏它 这是我的代码: <?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

我的Coordinator布局中有一个浮动按钮,当我到达布局的末尾时,我想隐藏它

这是我的代码:

<?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>

这里有很多风景
当我向下滚动并到达底部时,我想隐藏浮动按钮,如何确保用户到达布局的末尾


谢谢

检查这里的答案=>@Renges我没有使用NestedScrollView而不是scrollView。