Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native android: How to change the color of ListView "end of scroll" animation?

How can I change the color of the animation?

enter image description here

like image 926
tal952 Avatar asked Feb 02 '16 09:02

tal952


2 Answers

The color is based on your accentColor in your AppTheme.

To change it, change your AppTheme (generally in res/values/styles.xml) to:

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">#F00</item>   <-- change to color
    <!-- Status Bar color -->
    <item name="colorPrimaryDark">#000</item>
    <!-- Details color -->
    <item name="colorAccent">#000</item>
</style>

Beware it's an global app change, every scrollview bounce animation will have this color.

like image 91
Bhullnatik Avatar answered Sep 19 '22 13:09

Bhullnatik


To change only the overflow animation color, use android:colorEdgeEffect. Otherwise it will be inherited from the colorPrimary in AppTheme.

The accepted answer should be changed to specify colorPrimary instead of colorAccent.

See answer here: android lollipop scrollview edge effect color

like image 43
Grey Vugrin Avatar answered Sep 19 '22 13:09

Grey Vugrin