android - trasparent statusbar navigationdrawer after setstatusbarcolor -


i'm try developing app navigation drawer template found on github.

in style.xml have:

<style name="apptheme" parent="theme.appcompat.noactionbar">     <!-- customize theme here. -->     <item name="colorprimary">#ff0000</item>     <item name="colorprimarydark">#0000ff</item> 

main

and status bar in navigation drawer ok. main

when click button runs command: getwindow().setstatusbarcolor(color.green); main

now status bar color in navigation drawer no more translucent main

how restore status bar color translucent?

the difference xml defined colors colorprimary , colorprimarydark not used directly set status bar color.

actually statusbar transparent time , underlaying view colored. thats why can have color on left on right side (have @ second screenshot). if call getwindow().setstatusbarcolor(..) indeed color statusbar directly , over-draw color of both views. needs stay transparent!

what want do, changing color of view underlaying status bar, done scriminsetsframelayout class.
have @ this question , this class library provided
there should find necessary information change color of area want to.


in case want reset color:

getwindow().setstatusbarcolor(color.transparent); 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -