문제

I've a settings activity, in which the user can set the app in fullscreen mode. When the back button is hitted, the user jumps back to the main activity.

I would like to make the activity fullscreen if he had setted fullscreen inside the settings activity, preferably withouth restarting the activity.

Also it would be great if the method is supported from android API 9, to Android API 19.

If there isn't a way that i can achive this without killing the activity, is there a way i can reload the activity with the same content without manually save it somewhere on the device?

Thanks a lot for help

도움이 되었습니까?

해결책

That supports API 7 to 19,

add the following before setContentView,

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top