• support@answerspoint.co.in

Activity restart on rotation Android

1654
Advertisement

In my Android application, when I rotate the device (slide out the keyboard) then my Activity is restarted (onCreate is called). Now, this is probably how it's supposed to be, but I do a lot of initial setting up in the onCreate method, so I need either:

  1. Put all the initial setting up in another function so it's not all lost on device rotation or
  2. Make it so onCreate is not called again and the layout just adjusts or
  3. Limit the app to just portrait so that onCreate is not called.
  • asked 11 years ago
  • B Butts

0Answer


Your Answer

    Facebook Share        
       
  • publish 11 years ago
  • viewed 1654 times
  • active 11 years ago

Best Rated Questions