Android Question Change Status Bar opacity/transparency level

Discussion in 'Android Questions' started by fgrdovic21, May 3, 2015.

  1. fgrdovic21

    fgrdovic21 Member Licensed 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!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. fgrdovic21

    fgrdovic21 Member Licensed User

    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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice