I need RecyclerView to scroll (this is all right), but TextView is not, i.e. it always remains at the top bottom sheet. Here is the xml of this snippet:
<android.support.v4.widget.NestedScrollView android:id="@+id/bottom_sheet" android:layout_width="match_parent" android:layout_height="250dp" android:fillViewport="true" android:background="#898989" app:layout_behavior="android.support.design.widget.BottomSheetBehavior"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/textViewR" android:layout_width="50dp" android:layout_height="50dp" android:text="dgd" android:gravity="center" android:textColor="#fff" /> <android.support.v7.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="8dp" android:orientation="vertical" android:layout_weight="1" android:paddingBottom="15dp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> </LinearLayout> </android.support.v4.widget.NestedScrollView> Thank you for your help!
TextViewfromScrollView. - eugeneekLinearLayoutin which yourTextViewwill go first, followed byScrollView. - eugeneek