Friday, January 11, 2008

Small Status Pane

Symbian S60 status pane occupies one-fifth of the screen, which is a lot of space. Programmer can disable it by one of the following methods:
  1. CCoeControl::SetExtentToWholeScreen() (during construction of the CCoeControl). It expands to full screen, but CBA pane is gone and skin background won't work properly.
  2. CEikStatusPane::MakeVisible(EFalse). It hides the status pane, CBA pane remains but the skin background still won't work properly.

The Menu and Web (application) on S60 3rd phone suggest that there should be a standard API which can reduce the status bar but show necessary or critical information. It took me a while to find something useful:
They are same except different in titles and first lines. Based on their suggestion, the simpliest way to reduce the status pane is:
    StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_SMALL );
If you call CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, Rect(), EFalse) after switching the layout, the skin background should work fine in both portrait and landscape mode. Note that in landscape mode, the status pane is already in minimum size. So, SwitchLayoutL might have no effects for landscape.

However, this resource id will only give a blank status pane. If the signal icon is desired, as it's useful when accessing Internet, use R_AVKON_STATUS_PANE_LAYOUT_SMALL_WITH_SIGNAL_PANE. Check out more in the avkon.rsg.


My app with small status pane. Skin background is working. However, it does not display the app title.

If you want to have the same mane pane as the menu, signal + battery + title, use R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT.

No comments: