gpt4 book ai didi

android - BottomsheetFragment 内的 Fragment 内的 Recyclerview 不滚动?

转载 作者:行者123 更新时间:2023-11-29 23:08:33 25 4
gpt4 key购买 nike

我有一个 BottomsheetDialogFragment,它有一个普通的 Fragment,它有一个 recyclerview。问题是我无法滚动 recyclerview。

我想过使用 NestedScrollView,但我在 fragment 中有搜索功能。当键盘弹出时,它工作正常,但一旦键盘隐藏,底板向下的过渡就不行了。所以,我无法使用它。

<?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:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinatorlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/whitebackground"


android:focusable="true">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/whitebackground"
>



</RelativeLayout>

</android.support.design.widget.CoordinatorLayout>

并且在运行时我正在膨胀包含 recyclerview 的布局。

最佳答案

您可以在 fragment 或 Activity 中使用 isNestedScrollingEnabled 属性。

recyclerOuter.isNestedScrollingEnabled = false

关于android - BottomsheetFragment 内的 Fragment 内的 Recyclerview 不滚动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56291717/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com