在 Activity 创建中 新加两句代码
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE); //去掉应用程序的标题栏
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, //去掉Android顶部的状态栏
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
}