How to make sure that S60 UI application draws itself proeprly when the device is switched between landscape and portrait mode.
How to make sure that S60 UI application draws itself proeprly when the device is switched between landscape and portrait mode.
just implement the HandleResourceChange() function, and then make sure in your SizeChanged function to take care of repositioning your components.
I gone thru some documentation specically the document S60_Platform_Scalable_UI_Support_v4_3_en.pdf where it is mentioned that
"Applications would normally be expected to run in any screen orientation, portrait or landscape. The applications can, however, specify a fixed orientation that they require to work in. By default, applications are set to work in any orientation, so only applications that have a definitive orientation require"
So it clearly says that "By default, applications are set to work in any orientation...."
So it means we dont need to code expliclity for making sure that any Avkon enabled UI application supports both the modes..it is done inherently by the UI framework itself.
In my application my UI gets all distorted when i switch back between landscape and portrait mode.
So not sure where i am getting it wrong...I am using Setting Lists in my UI.
Yes it's true but u have understood the other way..So it clearly says that "By default, applications are set to work in any orientation...."
For the applns we write we need to decide how to display them in either of the screen modes..
The framework juz notifies thro HandleResourceChangeL that there is a change in orientation and does it's part...
Maybe u cud see the menubars wud be handled by the framework itself in case of orientation..it places them vertically...
In our application..we need to take care of the remaining display area given to us...i.e probably ClientRect()..
we need to resize/reposition our controls when there is an orientation change..
Thanks SymbianYucca....I will try that actually i posted the second message while u were typing ur reply...so missed ur reply....
Let me try that real quick and see.