Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.angelmmg90:AutoScrollContent:0.1.0'
}
<com.teseo.studios.autoscrollcontent.AutoScrollContent
android:id="@+id/rv_auto_scroll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
You must configure your recycler view
binding.rvAutoScrollContent.setLoopEnabled(true)
binding.rvAutoScrollContent.openAutoScroll(speed = 40, reverse = false)
It is possible to manually slide when swiping automatically
binding.rvAutoScrollContent.setCanTouch(true)