Android系统标栏显示和隐藏

显示标栏:

WindowManager.LayoutParams laParams = getWindow().getAttributes();
laParams.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().setAttributes(laParams);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);


隐藏标栏:


WindowManager.LayoutParams laParams = getWindow().getAttributes();
laParams.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
getWindow().setAttributes(laParams);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);

你可能感兴趣的:(android)