不显示状态栏

时间:2022-04-22 15:58:08

//设置不显示手机状态栏
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
不显示状态栏

    @Override
protected 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.activity_splash);