在Activity中加上上面代码就可以实现,需要注意的是需要在
setContentView(R.layout.main);
之前添加,不然将会抛出运行时异常
//去除title
requestWindowFeature(Window.FEATURE_NO_TITLE);
//去掉Activity上面的状态栏,即全屏
getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN , WindowManager.LayoutParams. FLAG_FULLSCREEN);