-1

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

Federico Ponzi
  • 2,682
  • 4
  • 34
  • 60

1 Answers1

1

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);
Ali Alnoaimi
  • 2,278
  • 2
  • 21
  • 31
  • Hi Ali, as i said in the edit i can't use this way because i don't wont to kill the activity since there are some data in it. – Federico Ponzi Apr 24 '14 at 15:28
  • Refer to http://stackoverflow.com/questions/18301554/android-change-app-theme-on-onclick Instead of using this code, change the theme to a fullscreen theme – Ali Alnoaimi Apr 25 '14 at 09:55