
Originally Posted by
vermaalok
Hi,
Could you share your view's DoActivateL() and DoDeActivateL() functions? and the constructor where BaseConstructL() is being called? Is the view defined in .rss file and passed as a parameter in BaseConstructL()?
Hi, Below is code for view in problem.
Code:
void CFirstView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if(!iFirstScreen)
{
TRect r = ClientRect();
// construct control and set parent
iFirstScreen = CFirstcreen::NewL(r);
iFirstScreen->SetMopParent(this);
//TResourceReader reader;
//CEikonEnv::Static()->CreateResourceReaderLC(reader, R_SETTINGS);
//CleanupStack::PopAndDestroy();
AppUi()->AddToViewStackL(*this, iFirstScreen);
iFirstScreen->ActivateL();
}
}
void CFirstView::DoDeactivate()
{
if(iFirstScreen) // if setting list has been created
{
// remove setting list from stack
AppUi()->RemoveFromViewStack(*this, iFirstScreen);
// clean up
delete iFirstScreen;
iFirstScreen= NULL;
}
}
void CFirstView::ConstructL()
{
// construct from resource
BaseConstructL(R_FIRSTVIEW);
}
Below is RSS
Code:
RESOURCE AVKON_VIEW r_firstview
{
cba=R_AVKON_SOFTKEYS_OPTIONS_DONE;
menubar=r_first_menubar;
}
Thanks