Can I set FLAG_LAYOUT_NO_LIMITS only for status bar?

前端 未结 13 1733
旧时难觅i
旧时难觅i 2020-12-23 13:32

I need to make transparent status bar. I am using getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS) and it is make status bar as I want. Bu

13条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 14:00

    this work for me

    getWindow().setFlags(
        WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
        WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
    )
    

    styles.xml

    
    

    v21\styles.xml

    
    

    status bar will be transparent or translucent, navigation bar won't

    hope this helps!

提交回复
热议问题