zoukankan      html  css  js  c++  java
  • 使S60程序全屏运行,fullscreen

    代码如下:

    #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)。
  • 相关阅读:
    tree
    mkdir
    touch
    rename
    dirname
    vue之导入Bootstrap以及jQuery的两种方式
    Vue组件系统
    报错:ERROR! The server quit without updating PID file (/usr/local/var/mysql/chenyuntekiMacBook-Air.local.pid).
    Linux命令
    Vue知识点小总结1
  • 原文地址:https://www.cnblogs.com/zziss/p/2026356.html
Copyright © 2011-2022 走看看