Wrong ripple color in Switch component
See original GitHub issue- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
Memory: 8.03 GB / 15.91 GB
Binaries:
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.1.0.0 AI-173.4907809
Description
I configure a different color for my Switch
component with the props trackColor
and thumbColor
. When I press the switch to change it’s value, the color on the ripple is completely different from the one configured with the props.
The bug only occurs on Android platform with the ripple and with the background color when the state is changing, After the animation ends, the background color assume the custom color I configured.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How can I override the style of the Material-UI switch ...
I want to control the color of the switch component, both when it is checked and when is is unchecked. By default it...
Read more >How to Enable ripple for Switch label in Angular ... - Syncfusion
You can achieve this by using rippleMouseHandler method. The following example illustrates how to enable ripple effect for labels in Switch component. Source....
Read more >Switch API - Material UI - MUI
Use when the component is not controlled. If true , the component is disabled. If true , the ripple effect is disabled.
Read more >Switches - Material Design
A travel app that uses Material Design components and Material Theming to create a personalized on-brand experience. Related link arrow_downward. Color. Crane's ...
Read more >How to Recreate the Ripple Effect of Material Design Buttons
Learn to make the ripple effect of Material Design's button component. We'll start with ES6+ JavaScript, before looking at other solutions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Follow the hint gave by @kelset, adding codes below in
ReactSwitch.java
fixes this issueScreenshot
But I’m not sure if this is a good practice.
@kelset Sure, here’s the PR