Hi androids, This is my first message over here and I'm a starting android developer so please be patient. Here's my case; I'm trying to create a simple program that sets the device's screen orientation by the press of a button. It's quite easy to set and change the orientation for the current activity, but I want to set and keep the setting until the button is pressed again like when the keyboard is slide out and back in on a G1 or by the movementsensor.
I started with using the setRequestedOrientation() but I quickly found that's only for the current activity, as soon is I close the activity the screen returns to it's original state. I then found that it's possible to set orientation with updateConfiguration() Configuration config = new Configuration(); config.orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; getResources().updateConfiguration(config, getResources ().getDisplayMetrics()); but this doesn't seem to have any effect for what soever. I've spent hours and hours googling for possible solutions but I'm completely stuck and the only option I found was to emulate the keyboard slide out and in, but besides the fact that I wouldn't know how, that seems a bit of a big solution for what seems to be a simple task. I thought this would be easy (and maybe it is), can somebody help me out or point me in the right direction? Thanks in advance, Michel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

