Is there any way to wait, after calling ActivateLocalViewL(), until the view is actually switched and drawn? Or get some notification callback when it actually happens?
I have described my very problem here
however it appears to be even more problematic - any time I try to switch the view and display the note in "one shot". I'm now almost sure this is due to asynchronous nature of view switching.
It is quite easy to reproduce the problem with sample application available here:
I modified it by adding
into UIDesignAppUi.cpp HandleKeyEventL() right afterCode:CAknErrorNote* iNote = new (ELeave) CAknErrorNote(ETrue); iNote->SetTimeout(CAknNoteDialog::ENoTimeout); iNote->ExecuteLD(_L("test"));
in line 181.Code:ActivateLocalViewL( TUid::Uid( iNaviTabs1->TabIdFromIndex( active ) ) );
Result: any time you navigate left, the current view is dimmed for a short while, but then it switches to the next tab as usual. Note window is not displayed.
Is my understanding correct, that CAknErrorNote is just a window-owning control, and has nothing to do with avkon view switching? According to documentation, each new window is automatically placed on top of window stack, so obviously the note will get obscured, if any delayed view activation happens.
Any help appreciated! For the moment the only option I see is to display modal note before trying to switch the view, but this contradicts my UI design a bit...