Reputation: 688
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?
Upvotes: 4
Views: 1923
Reputation: 6073
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
"
Upvotes: 2