Example of Change Color of RefreshControl in React Native

Hello friends, In today’s tutorial we would learn about setting main color of Refresh Control component in react native. As you all know recently we have start covering all the tutorials regarding Refresh control one by one. Refresh Control supports native color code, So there are two props one for Android and one for iOS to set color of refresh control component. We would discuss both of them in our tutorial. So in this tutorial we would learn about Example of Change Color of RefreshControl in React Native.

Default RefreshControl color :-

RefreshControl after changing color :-

Props :-

  1. colors:- This prop is Android Only prop. In this prop we have to pass Array of Color codes. It is used to set refresh control color in Android devices.
  2. tintColor:- This prop is iOS Only prop. It is used to set refresh control color in iOS devices.

Contents in this project Example of Change Color of RefreshControl in React Native :-

1. On this block I’m sharing a small line of code, So you can understand how it works. As you can see in Below line of code we’re using colors prop for Android and tintColor prop for iOS.

Note :- I have already make a tutorial explaining all source code present in this tutorial. You can read that tutorial from HERE.

2. Complete Source Code for App.js File :-

Screenshot in Android :-

Example of Change Color of RefreshControl in React NativeScreenshot in iOS :-

Change Color of RefreshControl in React Native

Leave a Reply

Your email address will not be published.