Android studio 使用新的导航体系结构组件,Sroll视图不会在片段中向上滚动

Android studio 使用新的导航体系结构组件,Sroll视图不会在片段中向上滚动,android-studio,android-fragments,android-scrollview,android-nestedscrollview,Android Studio,Android Fragments,Android Scrollview,Android Nestedscrollview,我有一个片段,我已经使用现代导航UI导航到它。我遇到的问题是,除非视图很长,否则滚动视图不会开始滚动。这没关系,我理解,但出现了一个问题,即当键盘打开时,屏幕底部的编辑文本输入被隐藏,因此您无法看到何时输入,因此需要向下滚动滚动视图,以便在键盘上方向上滚动视图 有没有办法启动滚动视图,这样当键盘隐藏编辑文本输入时,我仍然可以向上滚动并查看输入的内容 我的导航主机片段 <fragment android:id="@+id/nav_host_fragment&

我有一个片段,我已经使用现代导航UI导航到它。我遇到的问题是,除非视图很长,否则滚动视图不会开始滚动。这没关系,我理解,但出现了一个问题,即当键盘打开时,屏幕底部的编辑文本输入被隐藏,因此您无法看到何时输入,因此需要向下滚动滚动视图,以便在键盘上方向上滚动视图

有没有办法启动滚动视图,这样当键盘隐藏编辑文本输入时,我仍然可以向上滚动并查看输入的内容

我的导航主机片段

<fragment
            android:id="@+id/nav_host_fragment"
            android:layout_below="@+id/app_bar_layout"
            android:name="androidx.navigation.fragment.NavHostFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:defaultNavHost="true"
            app:navGraph="@navigation/navigation_graph"
            android:layout_above="@+id/bottom_nav"/>

但它仍然不起作用

我还尝试将以下属性设置为滚动视图

    android:isScrollContainer="false"
    android:fitsSystemWindows="true"
    android:fillViewport="true"


你有解决上述问题的方法吗?我刚刚添加了空间。你有解决上述问题的方法吗?我刚刚添加了空间
app:layout_behavior="@string/appbar_scrolling_view_behavior"

    android:isScrollContainer="false"
    android:fitsSystemWindows="true"
    android:fillViewport="true"