Hide status bar in android 4.4+ or kitkat with Fullscreen

前端 未结 4 1918

I\'m using following code for hiding status bar with full screen purpose:

    void HideEverything(){
        if (Build.VERSION.SDK_INT < 16) {
                    


        
4条回答
  •  遥遥无期
    2020-12-12 02:27

    Using below code you can use full screen ;

    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    

    Write below code above setcontentview.

    Note : Don't give any theme to this activity.

    Hope this helps.

提交回复
热议问题