首页 > 解决方案 > 如果 BottomSheet 在布局中并且可见,CircleRefreshLayout 不会向后滑动

问题描述

如果布局中存在 BottomSheet 并且其可见性设置为“可见”,则CircleRefreshLayout不会向后滑动。下面是我的 XML 布局。

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorWhite">

    <com.tuesda.walker.circlerefresh.CircleRefreshLayout
        android:id="@+id/circleRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:AniBackColor="@color/wallet_blue"
        app:AniForeColor="@android:color/white"
        app:CircleSmaller="4">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <!--MY_VIEW-->
        </FrameLayout>

    </com.tuesda.walker.circlerefresh.CircleRefreshLayout>

    <FrameLayout
       android:id="@+id/bottom_sheet"
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
       <!--MY_VIEW-->
   </FrameLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

当我将“bottom_sheet”的可见性设置为GONE时,CircleRefreshLayout工作正常(在circleRefreshLayout.finishRefreshing();调用后向后滑动)但当 bottom_sheet 为“可见”时不会向上滑动。

标签: javaandroidxmlandroid-studioandroid-layout

解决方案


推荐阅读