android - requestWindowFeature(Window.FEATURE_NO_TITLE) exception

后端 未结 5 539
后悔当初
后悔当初 2020-12-21 18:14

I am setting a specific activity full screen when the use hits a START button.

In this case the showStopButton() is called .

It\'s running fine

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-21 18:31

    it's so simple ... I just need to hide the ActionBar... then show it when back to standard screen...

       private void showStopButton(){
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
            ActionBar actionBar = getActionBar();
            actionBar.hide();
            getWindow().findViewById(android.R.id.content).requestLayout();
    

提交回复
热议问题