Change screen orientation of UI application
From Forum Nokia Wiki
The following example shows how to change the screen orientation of an S60 UI application, from portrait to landscape or vice versa.
The method that is used to do the rotation is CAknAppUiBase::SetOrientationL(). There is also another method to get the current screen orientation, CAknAppUiBase::Orientation().
The following example shows a method that will change the orientation to portrait if the current one is landscape and vice versa.
void CMyClass::RotateMe() { // Changing from portrait to landscape or vice versa. iIsPortrait = !iIsPortrait; // Change the screen orientation. if (iIsPortrait) { AppUi()->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait); } else { AppUi()->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape); } }
Internal links
- Scalable UI
- Layout-awareness challenges in custom UIs
- How to find out the correct location for softkey labels
External links
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CCamera::EnumerateCaptureSizes() [resolution] on N80 | rvogt | Symbian Media (Graphics & Sounds) | 5 | 2006-08-23 06:10 |
| Nokia N95 GPS question | Tartoui | Location Based Services and Navigation | 12 | 2008-07-04 00:19 |
| Diffrent title name for diffrent screens | ab | General Symbian C++ | 2 | 2007-12-11 05:46 |
| Questions - Symbian signed tests | Bill_Murray | Symbian Signing, Certification and Security | 3 | 2007-06-28 09:39 |
| Any phone API aupport to change screen server or wall paper | ghjkfor | Mobile Java Media (Graphics & Sounds) | 1 | 2008-01-30 10:27 |


