在Activity的onCreate方法中,可以通过下面的代码设置Activity为全屏显示
效果图:
[img]http://dl.iteye.com/upload/attachment/396548/b40bbadf-ec34-3196-95ad-d172379046c2.png[/img]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
效果图:
[img]http://dl.iteye.com/upload/attachment/396548/b40bbadf-ec34-3196-95ad-d172379046c2.png[/img]