This was driving me nuts! After finding this post I figured it could be done...
After some serious head scratching and self-doubt, I've worked out what is wrong!
@Erel example should have be written as...
Where FF is the alpha value required, either fully opaque (FF) or fully transparent (00). This might seem obvious to most of you but I gave up on it late last night and it's only with a fresh set of eyes that I've realised what I was doing wrong. Hope it helps others having similar trouble.
But everything I tried resulted in just the default colour being applied, at least that's what I thought was happening. The colour values I was using were taken from the Material guidelines website.This will also work:
And if you need to parse a string then:B4X:Activity.Color = 0xE4E4E2
B4X:Activity.Color = Bit.ParseInt(text.Replace("#", ""), 16)
After some serious head scratching and self-doubt, I've worked out what is wrong!
@Erel example should have be written as...
B4X:
Activity.Color = 0xFFE4E4E2