180 void CGlxListViewImp::DoMLViewActivateL(const TVwsViewId& /* aPrevViewId */, |
180 void CGlxListViewImp::DoMLViewActivateL(const TVwsViewId& /* aPrevViewId */, |
181 TUid /* aCustomMessageId */, const TDesC8& /* aCustomMessage */) |
181 TUid /* aCustomMessageId */, const TDesC8& /* aCustomMessage */) |
182 { |
182 { |
183 TRACER("CGlxListViewImp::DoMLViewActivateL"); |
183 TRACER("CGlxListViewImp::DoMLViewActivateL"); |
184 |
184 |
|
185 TUint transitionID = (iUiUtility->ViewNavigationDirection()== |
|
186 EGlxNavigationForwards)?KActivateTransitionId:KDeActivateTransitionId; |
|
187 |
|
188 //Do the activate animation only for views other than mainlist view and |
|
189 //on backward navigation from any other views to main list view, since |
|
190 //for the app start the animation effect is by default provided. |
|
191 if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot || |
|
192 transitionID == KDeActivateTransitionId) |
|
193 { |
|
194 GfxTransEffect::BeginFullScreen( transitionID, TRect(), |
|
195 AknTransEffect::EParameterType, |
|
196 AknTransEffect::GfxTransParam( KPhotosUid, |
|
197 AknTransEffect::TParameter::EEnableEffects) ); |
|
198 GfxTransEffect::EndFullScreen(); |
|
199 } |
|
200 |
185 iNextViewActivationEnabled = ETrue; |
201 iNextViewActivationEnabled = ETrue; |
186 if(StatusPane()) |
202 if(StatusPane()) |
187 { |
203 { |
188 StatusPane()->MakeVisible(ETrue); |
204 StatusPane()->MakeVisible(ETrue); |
189 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
205 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
288 |
304 |
289 iPreviewTNBinding = CGlxPreviewThumbnailBinding::NewL(*this); |
305 iPreviewTNBinding = CGlxPreviewThumbnailBinding::NewL(*this); |
290 CreateListL(); |
306 CreateListL(); |
291 iProgressIndicator = CGlxProgressIndicator::NewL(*this); |
307 iProgressIndicator = CGlxProgressIndicator::NewL(*this); |
292 iMMCNotifier = CGlxMMCNotifier::NewL(*this); |
308 iMMCNotifier = CGlxMMCNotifier::NewL(*this); |
293 |
|
294 TUint transitionID = (iUiUtility->ViewNavigationDirection()== |
|
295 EGlxNavigationForwards)?KActivateTransitionId:KDeActivateTransitionId; |
|
296 |
|
297 //Do the activate animation only for views other than mainlist view and |
|
298 //on backward navigation from any other views to main list view, since |
|
299 //for the app start the animation effect is by default provided. |
|
300 if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot || |
|
301 transitionID == KDeActivateTransitionId) |
|
302 { |
|
303 GfxTransEffect::BeginFullScreen( transitionID, TRect(), |
|
304 AknTransEffect::EParameterType, |
|
305 AknTransEffect::GfxTransParam( KPhotosUid, |
|
306 AknTransEffect::TParameter::EEnableEffects) ); |
|
307 iIsTransEffectStarted = ETrue; |
|
308 } |
|
309 |
|
310 } |
309 } |
311 |
310 |
312 // --------------------------------------------------------------------------- |
311 // --------------------------------------------------------------------------- |
313 // From CAknView |
312 // From CAknView |
314 // View deactivation function. |
313 // View deactivation function. |
720 GLX_DEBUG1("CGlxListViewImp::CreateListL() - SetEmptyTextL()"); |
713 GLX_DEBUG1("CGlxListViewImp::CreateListL() - SetEmptyTextL()"); |
721 //set the text to be shown if the list is empty. |
714 //set the text to be shown if the list is empty. |
722 HBufC* emptyText = StringLoader::LoadLC(R_LIST_EMPTY_VIEW_TEXT); |
715 HBufC* emptyText = StringLoader::LoadLC(R_LIST_EMPTY_VIEW_TEXT); |
723 iList->SetEmptyTextL(*emptyText); |
716 iList->SetEmptyTextL(*emptyText); |
724 CleanupStack::PopAndDestroy(emptyText); |
717 CleanupStack::PopAndDestroy(emptyText); |
|
718 |
|
719 //While coming back to main listview |
|
720 TGlxIdSpaceId id = iMediaList->IdSpaceId(0); |
|
721 if((id == KGlxIdSpaceIdRoot) && (mediaCount > 0)) |
|
722 { |
|
723 for (TInt i = 0; i < mediaCount; i++) |
|
724 { |
|
725 SetDefaultThumbnailL(i); |
|
726 } |
|
727 } |
725 } |
728 } |
726 |
729 |
727 //Fix for ESLM-7SAHPT::Clear Flag to Disable QWERTY search input in list view |
730 //Fix for ESLM-7SAHPT::Clear Flag to Disable QWERTY search input in list view |
728 iList->ClearFlags(CHgScroller::EHgScrollerSearchWithQWERTY ); |
731 iList->ClearFlags(CHgScroller::EHgScrollerSearchWithQWERTY ); |
729 |
732 |
737 AppUi()->AddToStackL(iList); |
740 AppUi()->AddToStackL(iList); |
738 } |
741 } |
739 |
742 |
740 if (mediaCount) |
743 if (mediaCount) |
741 { |
744 { |
742 TGlxIdSpaceId id = iMediaList->IdSpaceId(0); |
|
743 |
|
744 for (TInt i=0; i<mediaCount; i++) |
745 for (TInt i=0; i<mediaCount; i++) |
745 { |
746 { |
746 const TGlxMedia& item = iMediaList->Item(i); |
747 const TGlxMedia& item = iMediaList->Item(i); |
747 iList->ItemL(i).SetTitleL(item.Title()); |
748 iList->ItemL(i).SetTitleL(item.Title()); |
748 iList->ItemL(i).SetTextL(item.SubTitle()); |
749 iList->ItemL(i).SetTextL(item.SubTitle()); |
749 // Set the default TNs for the main listview |
|
750 if (id == KGlxIdSpaceIdRoot) |
|
751 { |
|
752 SetDefaultThumbnailL(i); |
|
753 } |
|
754 } |
750 } |
755 GLX_DEBUG3("CGlxListViewImp::CreateListL() Medialist Count = %d, " |
751 GLX_DEBUG3("CGlxListViewImp::CreateListL() Medialist Count = %d, " |
756 "iLastFocusIndex %d",mediaCount,iLastFocusedIndex); |
752 "iLastFocusIndex %d",mediaCount,iLastFocusedIndex); |
757 if(iLastFocusedIndex >= mediaCount) |
753 if(iLastFocusedIndex >= mediaCount) |
758 { |
754 { |