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.

valuecolor not applied to the buttons in Sitemap-Switch

See original GitHub issue

I have in a sitemap:

Switch item=rm label=“Switch [MAP(switcha.map):%s]” mappings=[ON=“AAA”, OFF=“BBB”] valuecolor=[ON=“green”, OFF=“red”, “blue”] labelcolor=[ON=“green”, OFF=“red”, “blue”]

This shows two choices on Android: AAA or BBB. The AAA and BBB choice are not colored with labelcolor. Instead labelcolor is used to present the value on the left of the choices (the [MAP(switcha.map):%s] content).

labelcolor shall change the color of the buttons/ON/OFF toggle.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maniac103commented, Jun 20, 2022

What makes you think labelcolor and valuecolor should be applied to the switches? From their naming, labelcolor should apply to the label (Switch in your example), and valuecolor applies to the label (the cyrillic text in your example). I do not see any evidence in the docs that either color should apply to switches, and your BasicUI screenshot shows that (at least) BasicUI developers agree with that interpretation.

0reactions
mueller-macommented, Jun 20, 2022

I fully agree with @maniac103. The buttons aren’t part of the value and thus shouldn’t be colored.

The fact that Basic UI works in the same way is an indicator that both UIs work as intended.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change color of CircularProgressIndicator
Three way to solve your problem · 1) Using valueColor property CircularProgressIndicator( valueColor: new AlwaysStoppedAnimation<Color>(Colors.
Read more >
Sitemap - Switch - Beginners - openHAB Community
I'm starting to get somewhere with my Garage Door opener. I have created everything i.e. Bindings, Things, Channels and Items, ...
Read more >
Button styles are not applied correctly · Issue #83900 - GitHub
Button styles are not applied correctly #83900 ... To change the text color for Button style buttons, you need to override foregroundColor ,...
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