• 使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)。
  • 相关阅读:
    python学习笔记6基本对象和流程语句整理
    暑假第二周总结(2018.7.16——7.22)
    暑假第三周总结(2018.7.23——7.29)
    《大道至简》读后感
    暑假第四周总结(2018.7.30——8.5)
    暑假第一周总结(2018.7.97.15)
    .NET中实现页面间的参数传递 QueryString\Application\Session\Cookie(转载)
    px和dip的区别与转换公式
    android开发ListView+Json+异步网络图片加载+滚动翻页的例子(图片能缓存,图片不错乱)
    正则表达式的惰性匹配方法
  • 原文地址:https://www.cnblogs.com/zziss/p/2026356.html
Copyright © 2020-2023  润新知