mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 22:41:28 +08:00
Summary: **Motivation** `Switch` on Android doesn't allow changing the colors unlike iOS. Changing the colors is desirable in a lot of cases to match the brand colors. The PR adds support for the `tintColor`, `onTintColor` and `thumbTintColor` props on Android, which more or less behave the same as iOS. The only difference is `tintColor` styles the border color on iOS, whereas it styles the background color on Android. **Test plan (required)** Run UIExplorer with the changes, and ensure that the switch example works properly. Here are screenshots from iOS and Android to compare.   cc brentvatne Closes https://github.com/facebook/react-native/pull/11940 Differential Revision: D4427491 fbshipit-source-id: 16c569d2e2261daaea93fffa83198f8f6b59a6c8