Can I set FLAG_LAYOUT_NO_LIMITS only for status bar?

前端 未结 13 1685
旧时难觅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 works on Samsung S10+ (Pie), Oppo F7 and Oppo F5S (Oreos):

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    

    As asked by the original poster, the app area is expanded on top and covers the status bar (where the clock is). But the android navigation (virtual) buttons remains at the bottom of the screen and the app sits on top of the android buttons.

提交回复
热议问题