×
Namespaces

Variants
Actions

A dynamically updated CBA cannot be displayed in a multi-view application when Nokia N93 device is rotating

From Nokia Developer Wiki
Jump to: navigation, search



Article Metadata
Tested with
Devices(s): Nokia N93
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 2 (30 Nov 2006)
Last edited: hamishwillee (14 Jun 2012)

Overview

A dynamically updated CBA cannot be displayed in a multi-view application when Nokia N93 device is rotating

Description

Portrait orientation -> View1 -> Landscape orientation (device rotating) -> switch to View2 -> Portrait orientation (device rotating) -> Update CBA dynamically in View2.
The CBA cannot be displayed.

Solution

TKeyResponse Ctest1Container2::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
     if(aKeyEvent.iCode == EKeyOK)
     {

                  if(iCba == R_AVKON_SOFTKEYS_OPTIONS_BACK)
                   {
                            CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
                            cba->SetCommandSetL(R_AVKON_SOFTKEYS_CANCEL);
                            cba->MakeVisible(EFalse);  //Add this line to the source code
                            cba->DrawNow();
                            cba->MakeVisible(ETrue);   //Add this line to the source code
                            //CEikonEnv::Static()->InfoWinL(_L("info"), _L("hi"));

                             iCba = R_AVKON_SOFTKEYS_CANCEL;
                   }
                  else
                  {
                           CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
                           cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);        
                           cba->MakeVisible(EFalse); //Add this line to the source code
                           cba->DrawNow();
                           cba->MakeVisible(ETrue); //Add this line to the source code
                           //CEikonEnv::Static()->InfoWinL(_L("info"), _L("hi"));

                           iCba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
                   }
                  return EKeyWasConsumed;
      }
      return EKeyWasNotConsumed;

}

This page was last modified on 14 June 2012, at 10:15.
56 page views in the last 30 days.
×