71 iListboxLandscape->SetContainerWindowL(*this); |
71 iListboxLandscape->SetContainerWindowL(*this); |
72 iListboxLandscape->CreateScrollBarFrameL(ETrue); |
72 iListboxLandscape->CreateScrollBarFrameL(ETrue); |
73 iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
73 iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
74 iListboxLandscape->SetSize(aRect.Size()); |
74 iListboxLandscape->SetSize(aRect.Size()); |
75 iListboxLandscape->MakeVisible(EFalse); |
75 iListboxLandscape->MakeVisible(EFalse); |
76 |
76 iListboxLandscape->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue); |
|
77 |
77 iListboxPortrait = new (ELeave) CAknDoubleLargeStyleListBox; |
78 iListboxPortrait = new (ELeave) CAknDoubleLargeStyleListBox; |
78 iListboxPortrait->ConstructL(this, aListboxFlags); |
79 iListboxPortrait->ConstructL(this, aListboxFlags); |
79 iListboxPortrait->SetMopParent( this ); |
80 iListboxPortrait->SetMopParent( this ); |
80 iListboxPortrait->SetContainerWindowL(*this); |
81 iListboxPortrait->SetContainerWindowL(*this); |
81 iListboxPortrait->CreateScrollBarFrameL(ETrue); |
82 iListboxPortrait->CreateScrollBarFrameL(ETrue); |
82 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
83 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
83 iListboxPortrait->SetSize(aRect.Size()); |
84 iListboxPortrait->SetSize(aRect.Size()); |
84 iListboxPortrait->MakeVisible(EFalse); |
85 iListboxPortrait->MakeVisible(EFalse); |
|
86 iListboxPortrait->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue); |
85 |
87 |
86 if (aRect.Width() > aRect.Height()) |
88 if (aRect.Width() > aRect.Height()) |
87 { |
89 { |
88 iLandscape = ETrue; |
90 iLandscape = ETrue; |
89 iListbox = iListboxLandscape; |
91 iListbox = iListboxLandscape; |
168 { |
170 { |
169 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
171 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
170 iListboxPortrait->UpdateScrollBarsL(); |
172 iListboxPortrait->UpdateScrollBarsL(); |
171 iListboxPortrait->MakeVisible(EFalse); |
173 iListboxPortrait->MakeVisible(EFalse); |
172 |
174 |
|
175 |
173 iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
176 iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
174 iListboxLandscape->MakeVisible(ETrue); |
177 iListboxLandscape->MakeVisible(ETrue); |
175 iListboxLandscape->SetFocus(ETrue, EDrawNow); |
178 iListboxLandscape->SetFocus(ETrue, EDrawNow); |
|
179 |
|
180 TInt index = iListboxPortrait->CurrentItemIndex(); |
|
181 |
|
182 if (IsVisible()) |
|
183 iListboxLandscape->SetCurrentItemIndex(index); |
|
184 |
176 iListbox = iListboxLandscape; |
185 iListbox = iListboxLandscape; |
177 } |
186 } |
178 else |
187 else |
179 { |
188 { |
180 iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
189 iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
182 iListboxLandscape->MakeVisible(EFalse); |
191 iListboxLandscape->MakeVisible(EFalse); |
183 |
192 |
184 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
193 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
185 iListboxPortrait->MakeVisible(ETrue); |
194 iListboxPortrait->MakeVisible(ETrue); |
186 iListboxPortrait->SetFocus(ETrue, EDrawNow); |
195 iListboxPortrait->SetFocus(ETrue, EDrawNow); |
|
196 |
|
197 TInt index = iListboxLandscape->CurrentItemIndex(); |
|
198 |
|
199 if (IsVisible()) |
|
200 iListboxPortrait->SetCurrentItemIndex(index); |
|
201 |
187 iListbox = (CEikColumnListBox*) iListboxPortrait; |
202 iListbox = (CEikColumnListBox*) iListboxPortrait; |
188 } |
203 } |
189 |
204 |
190 iListbox->SetSize(Size()); |
205 iListbox->SetSize(Size()); |
191 ActivateL(); |
206 ActivateL(); |
192 DrawNow(); |
207 DrawNow(); |
193 DP("CPodcastListContainer::SizeChanged END"); |
208 DP("CPodcastListContainer::SizeChanged END"); |
194 } |
209 } |