I've got an activity that is in a landscape mode - it's a player. Whenever I hit display-off button activity gets recreated and the screen goes black. After that I hit display-on to bring the interface back and the activity gets recreated again.
I guess this is because on my samsung i9001 display button not only shuts down the display but also brings that system-desktop to the foreground - so it's the first orientation change that causes activity recreation. Furthermore, when display gets active again and the activity starts it needs to change orientation/create activity again(not sure about it). My question is how do I prevent the first recreation of the activity when I hit display-off. Is it possible ? P.S. Additionaly I'm worried that shutting down the display and recreating the activity might cause ineficient resource usage since usual action-sequence of the activity is to load data and start the playback. I think I can overcome it with some sort of boolean flag - but how do I set it exactly - watch for key codes ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

