Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change statusBar color if its transparent? #14

Open
Kolyall opened this issue Sep 15, 2017 · 0 comments
Open

How to change statusBar color if its transparent? #14

Kolyall opened this issue Sep 15, 2017 · 0 comments

Comments

@Kolyall
Copy link

Kolyall commented Sep 15, 2017

My AppTheme:

 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:windowLightStatusBar">false</item>
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="android:windowTranslucentStatus">false</item>
        <item name="android:windowContentTransitions">true</item>
 </style>

     <color name="colorPrimary">#4FA7A0</color>
    <color name="colorPrimaryDark">#4FA7A0</color>
    <color name="colorAccent">#4FA7A0</color>

It looks like:
2
And with opened drawer:
2

When I make this:

  @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Scoop.getInstance().bind(this, Toppings.PRIMARY, getToolbar()) 
                                         .bindStatusBar(this, Toppings.PRIMARY_DARK)
  }

void onSomeEvent(){
	Scoop.getInstance().update(Toppings.PRIMARY, someColorInt) 
 					 .update(Toppings.PRIMARY_DARK, someDarkColorInt);
}

As you can see now status bar is not transparent for drawer. It looks like this:
2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant