AppBar Won't Overlap Statusbar, When Using CollapsingToolbarLayout
I want AppBar to overlap StatusBar. AppBar has image as background and I want this image to overlap statusbar, but when I use CollapsingToolbarLayout StatusBar gets white and image
Solution 1:
Take a folder and set the theme..
Main theme In values/styles.xml
<resources>
<style name="BaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorControlHighlight">@color/accent_translucent</item>
<item name="colorAccent">@color/accent</item>
</style>
</resources>
res/values-v21/styles.xml
<resources>
<style name="AppTheme" parent="BaseTheme">
<item name="android:colorControlHighlight">@color/accent_translucent</item>
<item name="android:windowSharedElementsUseOverlay">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>
Note: If you are using android:windowTranslucentStatus ... Remove it From themeor set false
<item name="android:windowTranslucentStatus">true</item>
Example shown here By this I am Remove this part and get result
Follow the Example For your requirement fulfillment
https://github.com/antoniolg/MaterializeYourApp
Like that result
Post a Comment for "AppBar Won't Overlap Statusbar, When Using CollapsingToolbarLayout"