please I need help I can't change the color of the title of the appBar, in mine it comes out black and I would like to change it to white... in this case I'm using a toolbar I tried everything I put <item name="colorAccent">#FFFFFF</item>
the accent on my theme but it doesn't change it. .I also did it by code
toolbar.setTitleTextColor(Color.parseColor("#FFFFFF"));
, it doesn't change it for me either and I also did it by xml but none of it works.
use
setTitleTextColor()
,Defining the color hex, for example
Here it is important to add the Alpha (transparency), because if you don't have it, you may have problems changing the color from a previously defined one.
A color defined in the SDK can be loaded:
You can also load a hex code in a string and parse it to convert it to Color: