Header Sep
Symbian OS Tips, Tricks & Code
My Rating Score
Login to rate page

November 2005
Using different UI modes for the P990 smartphone: a code example

[Back]

December 2006: example application updated from UIQ 3 beta SDK to final UIQ 3 SDK

The Symbian OS v9 based P990 smartphone supports different UI modes, such as portrait/landscape, flip open/flip closed and with/without title bar, button bar and status bar. The following code example shows how to use these modes for the Sony Ericsson P990 smartphone:

Download code example>>

To build the project for the P990 smartphone, use the following commands:

$ bldmake bldfiles
$ abld build gcce urel
$ makesis uimodes.pkg

When the application has been started on the smartphone, information about the different UI-modes is shown, as seen in the following screenshots:

Portrait, flip open.

 

Portrait, flip open, no buttonbar.

 

Landscape, flip closed.

Landscape, flip open.

The P990 supports both portrait and landscape mode. Furthermore, the landscape mode can also be used inverted, meaning that the screen is rotated 180 degrees. Both flip open and flip closed are supported. It is also possible to select which system bars/screen furniture should be present on the screen, so it is possible to view the menu bar, button bar and status bar. However, landscape mode must be used in full screen. This means that the menu, button and status bar should not be shown in landscape mode. The same applies for both flip closed and flip open.

Different combinations are possible to use, for example:

"Portrait flip closed with button and status bar without menu bar"

When the example application is active and the flip is currently closed, the flip can be opened by the user, and the application will automatically adapt to the new screen size. The application will remain in the foreground. However, when the flip is open at first, and becomes closed, the application will be put in the background and a system application (the standby screen) will be activated. In this state the application can be manually activated by using the application picker.

The following UI configurations are supported by the P990:

Flip Closed (softkey style UI)

  • KQikSoftkeyStyleSmallPortrait
  • KQikSoftkeyStyleSmallLandscape
  • KQikSoftkeyStyleSmallLandscape180

Flip Open (pen style UI)

  • KQikPenStyleTouchPortrait
  • KQikPenStyleTouchLandscape
  • KQikPenStyleTouchLandscape180

Changing between different modes using TQikViewMode can be done as follows:

TQikViewMode viewMode;
      viewMode.SetAppTitleBar(ETrue);
      viewMode.SetButtonOrSoftkeyBar(ETrue);
      viewMode.SetStatusBar(ETrue);
  SetView(viewMode);

To change to portrait mode with CQUiConfigClient, use the following code:  

CQUiConfigClient::Static().SetCurrentConfigL(KQikSoftkeyStyleSmallPortrait);

In the file "uimodes_loc.rss" the screen modes which are supported for the example application are defined. The VIEW_DATA items for the applications default view is listed first. The application picker looks at these items to determine if the application shall be shown or not. 

The following shows a part of the resource file:
VIEW_DATA
  {
  uid = EUIModesBaseViewPage;
  screen_mode = EQikScreenModeSmallPortrait;
  caption_and_icon =
   {
   CAPTION_AND_ICON_INFO
    {
    }
   };       
  },

For more information, refer to the UIQ 3 Beta SDK documentation available for download from the UIQ Developer Program>>  

UIQ 3 SDK / UIQ Developer Library / UIQ Migration Quick Guide / 5 UI Configurations

UIQ 3 SDK / UIQ Developer Library / UIQ API Reference / Qikon / TQikViewMode

UIQ 3 SDK / UIQ Developer Library / UIQ API Reference / QUiConfigServer / CQUiConfigClient

Also refer to the P990 Developers' Guidelines>>

 

 

My Rating Score
Login to rate page