I am trying to change the color of scroll indicator of ScrollView in react-native. If I use this prop on Android I will get an error, that indicatorStyle is not a valid property. Now this is not suprising because it is described in documentation it is suppoerted only on iOS.
Now the question is, is there a way to change the color of indicator on Android?
Create a xml scrollbar
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<gradient
android:angle="45"
android:endColor="#FF3401"
android:centerColor="#ff5c33"
android:startColor="#FF3401" />
<corners android:radius="8dp" />
</shape>
and add this scroll bar like
android:scrollbarThumbVertical="@drawable/scrollbar
"
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