Как сделать модальную прокрутку нижнего листа? - PullRequest
0 голосов
/ 02 ноября 2019

У меня есть BottomSheetDialogeFragment с этим макетом. Я хочу прокрутить весь фрагмент, а не только вид сетки. Я попытался вложить LinearLayout с scrollview и NestedScrollView, но в обоих случаях модальные даже не скользят вверх.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:scrollbars="vertical">

    <ImageView
        android:background="@color/colorPrimary"
        android:id="@+id/imageView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:srcCompat="@drawable/heart"
        android:scaleType="fitXY"
        android:adjustViewBounds="true"/>

    <GridView
        android:id="@+id/gridView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:stretchMode="columnWidth"
        android:gravity="center"
        android:numColumns="4" />
</LinearLayout>
...