سؤال

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