A dynamically updated CBA cannot be displayed in a multi-view application when Nokia N93 device is rotating
Article Metadata
Tested with
Compatibility
Article
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;
}

