problem with view switching

Login to reply to this topic.
Tue, 2008-01-29 06:48
Joined: 2008-01-08
Forum posts: 1

Hi
I am doing view switching. But after visiting a view and deactivating it, if I again visit the same view, then it starts from last image of that view and does not start drawing the view from starting. Actually I am making changes in view based on option selected in one view to next view which will be called next.

I use this for my email application.
I have two views MAINVIEW and MESSAGELISTVIEW. When i tap on any option (Inbox, outbox, send items, drafts) in MAINVIEW, then it goes to MESSAGELISTVIEW, and draws the view based on option selected in MAINVIEW. Problem is that once MESSAGELISTVIEW is created, next time going to it, it redraw the same as earlier and does not draw according to option selected. I want to know which function is called every time when a view is activated.

ViewConstructL() and ViewActivatedL() are not called when a view is visited again.

Follwing is my code for view switching.

appPtr = static_cast (iCoeEnv->AppUi());
appPtr->DeactivateActiveViewL();
appPtr->iFolder = EDrafts; // pass the parameter which will decides the next drawing next view.
aViewId=TVwsViewId(KUidSwiftMainApp,KUidSwiftMessageListView);
appPtr->ActivateViewL(aViewId);

Thanks in Advance.


Mon, 2008-04-14 12:37
Joined: 2005-09-30
Forum posts: 35
Re: problem with view switching

Are you calling view deactivate while switching to next view?

  • Login to reply to this topic.