1

I have gone through this to change the color of my title bar. I'm trying to figure out how I would switch that programmatically? Say if a user clicks a button, I want to switch to another predefined color. How might I do that?

Community
  • 1
  • 1
Roger
  • 4,249
  • 10
  • 42
  • 60

1 Answers1

0

You can easily do this with applying color to the title bar programmatically. Changing the layout color programmatically done by,

textView.setBackgroundColor(R.color.titletextcolor);

do this in your button click event dynamically and you will get the color change.

Akilan
  • 1,707
  • 1
  • 16
  • 30