Skip to content

Instantly share code, notes, and snippets.

@MomenZaq
Last active January 16, 2021 04:00
Show Gist options
  • Save MomenZaq/54814d9ec02e745ff0d6cf4ee1102d79 to your computer and use it in GitHub Desktop.
Save MomenZaq/54814d9ec02e745ff0d6cf4ee1102d79 to your computer and use it in GitHub Desktop.
RecyclerViewWithNestedScrollViewExample
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<!-- Other views -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="@string/test_text"
android:textSize="22sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_marginTop="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
@toki16k
Copy link

toki16k commented Jan 16, 2021

@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment