android 实现全屏幕

在开发中,我们经常需要遇到去掉标题栏,或者一并去掉顶部信息栏,实现全屏幕

 super.onCreate(savedInstanceState);
//去掉标题栏
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
//去掉信息栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);

setContentView(R.layout.main);

你可能感兴趣的:(android)