On 28 June 2011 12:10, Neil <[email protected]> wrote: > Hi guys, > > In my activity I have a SurfaceView which I want to lock the > orientation when rotating the device. But I still want other views in > the activity to be rotated with the device which means I can not use > Activity.setRequestedOrientation to lock the orientation. So is there > a way to achieve this? >
I am afraid you can't lock just view with framework but rotate the activity. You may want to listen to orientation change and rotate the view in code, so no matter what's device orientation, your view will remains 'unchanged'. And do not foget to care rotation right (so user can rotate the activity around the clock, not just 90 degs) Regards, Marcin Orlowski *Tray Agenda <http://bit.ly/trayagenda>* - keep you daily schedule handy... *Date In Tray* <http://bit.ly/dateintraypro> - current date at glance... WebnetMobile on *Facebook <http://webnetmobile.com/fb/>* and *Twitter<http://webnetmobile.com/twitter/> * -- 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

