A wrapper ViewGroup that provides an iOS Look-And-Feel Overscroll Effect
This is the layout used in MIUI Setting App.
Add it in your root build.gradle
allprojects {
repositories {
//... ommitted for brevity
maven { url 'https://jitpack.io' }
}
}Add the dependency in your build.gradle.
implementation 'com.github.ldt-libs:SpringBackLayout:1.0'Wrap any scrollable view in the SpringBackLayout, like RecyclerView, ListView or NestedScrollView.
<com.ldt.springback.view.SpringBackLayout
android:id="@+id/root"xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"app:scrollOrientation="vertical"tools:context=".MainActivity">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"android:layout_width="match_parent"android:layout_height="match_parent"/>
</com.ldt.springback.view.SpringBackLayout>