Welcome!
click me.

2020年4月

public class GuiUtils {
    public static void hideStatusBar(AppCompatActivity activity1){
        WindowManager.LayoutParams lp2 = activity1.getWindow().getAttributes();
        //LayoutParams.FLAG_FULLSCREEN 强制屏幕状态条栏弹出
        lp2.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
        activity1.getWindow().setAttributes(lp2);
        //不允许窗口扩展到屏幕之外
        activity1.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);

    }
}
;