question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Switch onTintColor bug on Android

See original GitHub issue

Description

When setting onTintColor prop for component Switch it works as expected. But when you change the value of the Switch it has the default green onTintColor for a fraction of a second.

Reproduction Steps and Sample Code

Here the bug is reproduced: https://sketch.expo.io/B1vEAochg

Solution

I think something needs to be tweaked in the Java side of the Switch component

Additional Information

  • React Native version: 0.42.0
  • Platform: Android
  • Development Operating System: MacOS

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
satya164commented, Apr 3, 2017

Well, it’s not a hack, and can be done is js, but anyway.

0reactions
hramoscommented, Apr 3, 2017

Agree with @henrikra.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change drawable color programmatically - android
Try this: Drawable unwrappedDrawable = AppCompatResources.getDrawable(context, R.drawable.my_drawable); Drawable wrappedDrawable ...
Read more >
Set Primary Color - Instabug
This API is used to change the color of both the text and icons to match your app color. You can pass to...
Read more >
Switch - Thunkable Docs
A switch is a component that has two settings, true and false. You can get your app to do specific tasks based on...
Read more >
How to Fix Color Switch App Not Working Issue - YouTube
not #Open #WorkingHow to Fix / Solve Color Switch App Not Working Issue | "Color Switch " Not Open Problem in Android &...
Read more >
How can I customize the color in switch? - MSDN - Microsoft
Appearance.OnTintColor= UIColor.FromRGB(192, 0, 0);. for Android to set "colorAccent" in Style.xml file for change Switch color .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found