2

Hi I want to change status bar color in ActionMode like Inbox app and Gmail app do. I know I can use setStatusBarColor, but is there any other way to do this? Like define status bar color of ActionMode in styles.xml?

Charlesjean
  • 566
  • 1
  • 5
  • 16
  • Have you tried [adding a style](http://stackoverflow.com/a/8640186/1133344) and then [setting it on your theme](http://stackoverflow.com/a/21853074/1133344)? – aluxian Jan 10 '15 at 13:14
  • @AlexandruRosianu I want to know if there is an attribute of style corresponds to this color. – Charlesjean Jan 10 '15 at 13:26
  • Sorry, I misunderstood the question. I don't think you can do this using only styles. – aluxian Jan 10 '15 at 13:42

1 Answers1

1

I can give you an idea on how you can get it done.

1) Firstly, just check when the ActionMode is turned on. I am sure you can do that so I am not elaborating on that.

2) Now, just set the color using the setStatusBarColor method of the Windows class. You ca check this answer to have a detailed insight on the problem and the solution.

Hope it helps. Do let me know if I can help you any further.

Aritra Roy
  • 15,355
  • 10
  • 73
  • 107