Android Question Change Status Bar opacity/transparency level

fgrdovic21

Member
Licensed User
Longtime User
Hello everyone

I know its possible to set the status bar as transparent in theme.xml, but I'm wondering, is it possible to change status bar opacity/transparency level.

Thanks in advance!
 

fgrdovic21

Member
Licensed User
Longtime User
There is a new theme in Android 4.4 which allows you to make partially transparent bars: http://developer.android.com/about/versions/android-4.4.html#UI

I haven't tried it.

Thanks for replying Erel,

Unfortunately, that does not allow me to choose what transparency level do I want.
Example: 25% Black (Status bar is black with 25% transparency).

I'll try to explain you what I want and maybe there's a workaround:

I have an app that uses AppCompat
In corwin42's example, he uses a panel as ActionBar
Its easy to change ActionBar color but its impossible to change Status Bar color, as far as I know, via normal code (not in theme.xml)
Since I want to allow user the ability to change theme (change colors of ActionBar and other elements), I'm stuck with a black Status Bar as default, or, with a color I have set up as colorPrimaryDark in Theme.xml.
Since it's also impossible to change what style (style from Theme.xml) I can use, the only way was to use transparent Status Bar.
But with default settings, Status Bar opacity is, I believe, at 50% which is way to dark.

Screenshot_2015-05-04-22-31-41.png This is with transparent Status Bar with default settings

Cheers
 
Upvote 0
Top