0

There is a transparent activity A.

A is using Theme.Translucent.NoTitleBar in AndroidManifest to be transparent.

What I want is to change status bar color to black remaining activity transparent.

Please help.

2 Answers2

3

From android Api-Level 21 you can use

Window window = activity.getWindow();

window.setStatusBarColor(activity.getResources().getColor(R.color.my_statusbar_color));

select black

android.R.color.black

To show and hide the status bar

ActionBar actionBar = getActionBar();
actionBar.show();
actionBar.hide();
Zumry Mohamed
  • 9,318
  • 5
  • 46
  • 51
0

You can create your own Theme which you can set to your activity through manifest.

Antas
  • 33
  • 1
  • 10