Accept color as int instead of resource
See original GitHub issueHi, I would like to set the color programatically, like this:
.header {
this.icon = R.drawable.vector_sync
this.color = 0xff123456.toInt()
}
However you only accept the resource. By looking at your code, you are explicitly calling getColor on buildNotification. Could you add a way for using non-resourced color?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How can I get color-int from color resource? - Stack Overflow
I am trying to get the individual red, blue and green components of a color defined in the resource (R.color.myColor) so that I...
Read more >More resource types - Android Developers
A color value defined in XML. The color is specified with an RGB value and alpha channel. You can use a color resource...
Read more >How can I get color-int from color resource? - Stack Overflow
I am trying to get the individual red, blue and green components of a color defined in the resource (R.color.myColor) so that I...
Read more >Colors and Styling for Visual Studio - Microsoft Learn
Learn how the Visual Studio User Experience uses color as a communication tool, instead of for purely aesthetic reasons.
Read more >ContourPlot (cn) Resources
You can use a color index value (integer) or a named color (string). Default: Transparent (-1). cnConpackParams: This string array resource allows you...
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 Free
Top 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
Great, thanks! It will be of great use here: https://github.com/bernaferrari/ChangeDetection
@bernaferrari I’ve put up the PR above. Let me know if the changes are in line with your initial proposition.