Theme gets messed up by CAknsBasicBackgroundControlContext
I'm using this kind of solution:
[URL="http://wiki.forum.nokia.com/index.php/Drawing_skins_in_container"]http://wiki.forum.nokia.com/index.php/Drawing_skins_in_container[/URL]
But in addition I also change the specific portion of skin to use it as a background to two richtexteditors:
[CODE]
if ( AknsUtils::SkinInstance() )
{
GFLOG1("CChatUiContainer::SetBackgroundL - SetLocalItemDefL");
HBufC* iconPath( _L("c:\\myicons.mif") );
CleanupStack::PushL( iconPath );
AknsUtils::SkinInstance()->SetLocalItemDefL(
AknsUtils::CreateMaskedBitmapItemDefL(
KAknsIIDQsnBgAreaMain,
*iconPath,
aBitmapId,
aMaskId ) );
CleanupStack::PopAndDestroy( iconPath );
}
[/CODE]
But I got very interesting problem, whenever I have my application running, put it to background and go change the Profile Theme from phone settings and go back to my application, it decides it's no good and changes the phone theme to the default theme. What could be the problem? How to fix it?
Re: Theme gets messed up by CAknsBasicBackgroundControlContext
you could always monitor the theme change event and then do the local settings again when the theme changes.
Re: Theme gets messed up by CAknsBasicBackgroundControlContext
What's the observer for detecting theme changes?
I think the problem is with missing this line from my container's destructor:
[CODE]
AknsUtils::SkinInstance()->RemoveLocalItemDefs();
[/CODE]
EDIT:
Nevermind, found the observer, though dunnow if it helps. :)
[URL="http://wiki.forum.nokia.com/index.php/Extended_Skins_API"]http://wiki.forum.nokia.com/index.php/Extended_Skins_API[/URL]
Re: Theme gets messed up by CAknsBasicBackgroundControlContext
m facing same problem.
I used AknsUtils::SkinInstance()->RemoveLocalItemDefs(); in container destructor.
But when I used this theme corrupted dialog box got removed. But it shows default CBA of theme instead of Changed CBA which I used.
Please help me its urgent
Thanks