I couldn't find any documentation on how to style the new refreshIcon
in the swipeRefreshLayout
?
this.swipeRefreshLayout.setProgressBackgroundColor(R.color.feed_refresh_1);
this just changes the <background color>
of the refresh icon background, is there a way to change the color of the arrow itself?
With the latest r21, you can change the spinning arrow tint passing just one color to one of these methods:
swipeRefreshLayout.setColorSchemeColors(Color.RED);
or:
swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_red_dark);
Tested and working on Android 5.0.2, should also work with every other version since v4. Have a nice day!
Use this.swipeRefreshLayout.setColorSchemeColors(..);
or this.swipeRefreshLayout.setColorSchemeResources(..);
.
See Android API reference.
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