Description: I want to disable fading that a viewPager has scroll to edges. Just like this: https://stackoverflow.com/questions/27724923/remove-recyclerview-scroll-effects. But it still exists. Actually, I don't know if it is a bug, maybe it shoule be a new feature.
Expected behavior: ViewPager2 looks like ViewPager with overScrollMode="never"
Source code:
<androidx.viewpager2.widget.ViewPager2
android:orientation="vertical"
android:overScrollMode="never"
android:id="@+id/main_container_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.viewpager2.widget.ViewPager2>
Android API version: Android API 29
Material Library version: implementation 'com.google.android.material:material:1.1.0-alpha08'
Device: Genymotion custom phone api 24
@DavidZXY, why have you closed this bug? Have you found a solution?
I have the same problems!
ViewPager2 use RecyclerView to improve the performance锛宻o--
private ViewPager2 mMainContainerViewPager;
...
((RecyclerView)mMainContainerViewPager.getChildAt(0)).setOverScrollMode(RecyclerView.OVER_SCROLL_NEVER); @sttimchenko @NikitaFrolovCR
This issue should be reopened.
The solution mentioned above is no more than a workaround since it relies on a private member and will not work if there is any changes in the view hierarchy inside ViewPager2.
Disabling over-scroll is a common need and should not be as hacky as this.
@DavidZXY can you reopen? if not ill open a new issue
@EhudPla @mxalbert1996 you are right.
Hi ViewPager is not part of our lib. Please file the bug
Most helpful comment
This issue should be reopened.
The solution mentioned above is no more than a workaround since it relies on a private member and will not work if there is any changes in the view hierarchy inside ViewPager2.
Disabling over-scroll is a common need and should not be as hacky as this.