Fix for screen rotation issues in 3rd edition 3rded
authorSebastian Brannstrom <sebastianb@symbian.org>
Thu, 22 Jul 2010 16:50:37 +0100
branch3rded
changeset 194 62a678609f15
parent 193 2a527c27fd09
child 195 392625d487b9
Fix for screen rotation issues in 3rd edition
application/src/PodcastListView.cpp
--- a/application/src/PodcastListView.cpp	Thu Jul 22 16:28:57 2010 +0100
+++ b/application/src/PodcastListView.cpp	Thu Jul 22 16:50:37 2010 +0100
@@ -98,12 +98,26 @@
 
 void CPodcastListContainer::HandleResourceChange(TInt aType)
 {
-	switch( aType )
-    	{
-	    case KEikDynamicLayoutVariantSwitch:
-		    SetRect(iEikonEnv->EikAppUi()->ClientRect());
-		    break;
-	    }
+	CCoeControl::HandleResourceChange(aType);
+	if ( aType==KEikDynamicLayoutVariantSwitch )
+		{
+		TRect rect;
+		AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
+		SetRect( rect );
+		
+		if ( iBgContext )
+		   	{
+		   	iBgContext->SetRect( rect );
+		   	}
+		DrawNow();
+		}
+//
+//	switch( aType )
+//    	{
+//	    case KEikDynamicLayoutVariantSwitch:
+//		    SetRect(iEikonEnv->EikAppUi()->ClientRect());
+//		    break;
+//	    }
 }
 
 void CPodcastListContainer::ScrollToVisible() {
@@ -241,6 +255,7 @@
 		      ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
 	titlePane->SetTextToDefaultL();
 
+	iListContainer->HandleResourceChange(KEikDynamicLayoutVariantSwitch);
 	DP("CPodcastListView::DoActivateL() END");
 
 }