代码如下:
#include <avkon.rsg> #include <eikbtgpc.h> #include <eikspane.h>
//----------------------------------------------------------------------------- // CFullScreenAppAppUi::ConstructL() //----------------------------------------------------------------------------- // void CMyFullscreenAppUi::ConstructL() { // Initialise app UI with standard value. BaseConstructL(CAknAppUi::EAknEnableSkin); // 1.Hide the softkey area(CBA) CEikButtonGroupContainer * softkeyGroup = Cba(); if(softkeyGroup) { softkeyGroup->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY); softkeyGroup->MakeVisible(EFalse); } // 2.Hide the status pane, will call HandleStatusPaneSizeChange CEikStatusPane* statusPane = StatusPane(); if(statusPane && statusPane->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_EMPTY) { statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_EMPTY); statusPane->MakeVisible(EFalse); } // 3.set the fullscreen flag if( !IsFullScreenApp() ) SetFullScreenApp(ETrue); // Create view object, and the ClientRect() return the whole size of screen. iMyFullscreenAppView = CMyFullscreenAppView::NewL(ClientRect()); ... // other code }
//---------------------------------------------------------------------------- // CMyFullscreenAppUi::HandleStatusPaneSizeChange() // Called by the framework when the application status pane // size is changed. Passes the new client rectangle to the AppView // ----------------------------------------------------------------------------- // void CMyFullscreenAppUi::HandleStatusPaneSizeChange() { CAknAppUi::HandleStatusPaneSizeChange(); // It's important to check iMyFullscreenAppView is NULL or not if(iMyFullscreenAppView) iMyFullscreenAppView->SetRect(ClientRect()); }
|
注: 与 无状态面板的资源体(R_AVKON_STATUS_PANE_LAYOUT_EMPTY) 对应的 普通状态面板的资源体(R_AVKON_STATUS_PANE_LAYOUT_USUAL)。