How can I change the overscroll glow effect color of a ViewPager in android? Or is there a way to change the overscroll color for the whole app via themes?
I know of setOverScrollHeader and footer, but these does "logically" of course not work for a viewpager in horizontal mode.
The simplest way to do it is to override colorPrimary
for your viewpager using themes.
For example :
In your fragment/activity :
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/AppTheme.Viewpager" />
In your file styles.xml
:
<style name="AppTheme.Viewpager" parent="AppTheme">
<item name="colorPrimary">#FFFFFF</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With