• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 2, 文章 - 73, 評論 - 60, 引用 - 0
            數(shù)據(jù)加載中……

            [S60]在程序的導(dǎo)航條中插入文本或圖片

            • 開發(fā)伙伴平臺:

            S60 3rd Edition


            • 詳細(xì)描述

            S60應(yīng)用程序在前臺時,可以設(shè)置導(dǎo)航條顯示自定義圖標(biāo)或文本。


            首先,我們要獲得一個狀態(tài)欄的引用。然后可以從中獲得導(dǎo)航欄的引用。應(yīng)用程序可以使用CAknNavigationDecorator類生成一個基于文本的Navi decorator對象。最后這個對象需要添加到導(dǎo)航欄中以便開始顯示:

            //------------------------------------------------------------------------------
             
            CAknNavigationControlContainer* iNaviPane = 0;
             
            CAknNavigationDecorator* iNaviDecorator = 0;
             
            //Get the reference of the status pane
             
            CEikStatusPane *statusPane = iEikonEnv->AppUiFactory()->StatusPane();
             
            if ( statusPane )
             
            {
             
            //Get the reference of the navi pane
             
            iNaviPane=static_cast<CAknNavigationControlContainer*>(statusPane->ControlL(
             
            TUid::Uid(EEikStatusPaneUidNavi)) );
             
            //Create a Navi decorator object
             
            iNaviDecorator= iNaviPane->CreateEditorIndicatorContainerL();
             
            //Get the reference of the indicator container inside the NaviDecorator
             
            CAknIndicatorContainer* indiContainer =
             
            static_cast<CAknIndicatorContainer*>(iNaviDecorator->DecoratedControl());
             
            if ( indiContainer && CEikStatusPaneBase::Current() )
             
            {
             
            TBuf<32> msgSize;
             
            msgSize.Append(_L("Test")); // Text to be displayed
             
             
            indiContainer->SetIndicatorValueL(
             
            TUid::Uid( EAknNaviPaneEditorIndicatorMessageLength ), msgSize );
             
             
            indiContainer->SetIndicatorState(
             
            TUid::Uid( EAknNaviPaneEditorIndicatorMessageLength ),
             
            EAknIndicatorStateOn);
             
            }
             
             
             
            //Push the object onto the navi pane.
             
            iNaviPane->PushL( *iNaviDecorator );
             
            }
             
            //------------------------------------------------------------------------------


            下面的這個示例代碼,演示了如何在導(dǎo)航欄中顯示一個圖標(biāo):

            //------------------------------------------------------------------------------
             
            CFbsBitmap* bitmap = NULL;
             
            CFbsBitmap* mask = NULL;
             
            CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
             
            CAknNavigationControlContainer* naviPane =
             
            (CAknNavigationControlContainer*)statusPane->ControlL(
             
            TUid::Uid(EEikStatusPaneUidNavi));
             
            // Create an icon
             
            AknIconUtils::CreateIconLC (bitmap, mask, KIconFile,
             
            EMbmCarsvgCircle, EMbmCarsvgCircle_mask); //KIconFile is the .mif file
             
             
            TSize size(30,30);
             
            AknIconUtils::SetSize(bitmap, size); // Sets the size of the extracted image
             
            //Create a Navi Decorator encapsulation for the image.
             
            CAknNavigationDecorator* naviDecorator =
             
            naviPane->CreateNavigationImageL(bitmap, mask);
             
            //Push the image onto the navi pane.
             
            naviPane->PushL(*naviDecorator);
             
            //------------------------------------------------------------------------------


            需要的頭文件及庫文件有:

            #include <aknnavi.h>               // for CAknNavigationControlContainer
             
            #include <eikspane.h>              // for CEikStatusPane
             
            #include <aknnavide.h>             // for CAknNavigationDecorator
             
            #include <akniconutils.h>          // for AknIconUtils
             
            #include <aknindicatorcontainer.h> // for CAknIndicatorContainer
             
            LIBRARY     aknicon.lib
             
            LIBRARY     fbscli.lib
             
            LIBRARY     avkon.lib


            注意:程序在前臺時這些導(dǎo)航欄上的文字和圖標(biāo)才得以顯現(xiàn),但手機(jī)待機(jī)時卻不會處理。

            posted on 2008-04-10 11:04 郭天文 閱讀(739) 評論(0)  編輯 收藏 引用 所屬分類: S60

            一本色道久久综合| 久久久中文字幕日本| 热re99久久6国产精品免费| 免费无码国产欧美久久18| 新狼窝色AV性久久久久久| 久久精品无码午夜福利理论片| 国产成人无码久久久精品一| 久久久久国产精品| 中文字幕久久亚洲一区| 久久久久久久97| 久久人人爽人人精品视频| 久久亚洲AV成人无码国产| 国产叼嘿久久精品久久| 久久精品国产2020| 成人午夜精品久久久久久久小说| 亚洲伊人久久综合中文成人网| 久久精品国产亚洲精品2020| 久久免费国产精品| 久久99国产综合精品女同| 亚洲另类欧美综合久久图片区| 久久久精品人妻一区二区三区蜜桃 | 国内精品伊人久久久久网站| 波多野结衣久久一区二区| 99久久免费国产特黄| 99久久香蕉国产线看观香| 久久精品男人影院| 久久久无码精品亚洲日韩按摩 | 日产精品久久久久久久性色| 草草久久久无码国产专区| 国产午夜久久影院| 日韩人妻无码一区二区三区久久 | 少妇高潮惨叫久久久久久| 久久综合九色欧美综合狠狠| 91亚洲国产成人久久精品网址| 无码AV中文字幕久久专区| 欧美亚洲国产精品久久| 日日狠狠久久偷偷色综合免费 | 色综合久久中文色婷婷| 欧美牲交A欧牲交aⅴ久久| 亚洲伊人久久大香线蕉综合图片| 精品久久久久成人码免费动漫 |