0
私は、RecyclerViewのスクロールが完璧に動作し、それらの2、 はできるだけ早く私は非常に小さいコンテンツを含む第2 RecyclerViewを追加する必要があり前に、私は2つのRecyclerView を持っていレイアウト内、ConstraintLayout
を使用して 最大3よBottomSheetBehavior とレイアウトを持っています2番目のRecyclerViewのスクロールが無効になっていて、最初のRecyclerView
を単純なLinearLayoutに変更すると、それもうまく動作します。 注:最初のRecyclerview
のコンテンツは非常に小さく、スクロールする必要はなく、2番目のコンテンツのみをスクロールする必要があります。なぜBottomSheetBehaviorで2つのRecyclerViewレイアウトが動作しないのですか?
<android.support.constraint.ConstraintLayout
android:id="@+id/store_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/bottom_navigation_height"
android:background="@android:color/transparent"
android:fitsSystemWindows="true"
app:behavior_hideable="false"
app:behavior_peekHeight="350dp"
app:layout_behavior="@string/bottom_sheet_behavior">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_marginTop="8dp"
android:background="@drawable/rounded_shape"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="19dp"
android:layout_height="23dp"
android:layout_marginStart="16dp"
android:layout_marginTop="19dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_search"/>
</android.support.constraint.ConstraintLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/list_filter"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:adapter="@{viewModel.filterAdapter}"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:nestedScrollingEnabled="true"
app:adapter="@{viewModel.findStoresAdapter}"
app:dividerDrawable="@{@drawable/vertical_divider}"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/list_filter"
app:layout_constraintVertical_bias="0.0"/>
</android.support.constraint.ConstraintLayout>
CoordinatorLayoutで使用するには、この[link](https://stackoverflow.com/a/46681326/4797289)をご確認ください。 –