From: Sreedeep Moulik Date: Fri, 6 Sep 2013 09:04:13 +0000 (+0530) Subject: Fix for 51220 - setting flag for layout change in orientation X-Git-Tag: accepted/tizen/20131002.165803^2~199^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13b582cc0f7998c85a493bbf8a12a96ecfaf70c7;p=platform%2Fframework%2Fnative%2Fuifw.git Fix for 51220 - setting flag for layout change in orientation Change-Id: I75d33f099cc22e2ef54e17ba58c9d797b5353f98 Signed-off-by: Sreedeep Moulik --- diff --git a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp index 2364539..0c15dd7 100644 --- a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp @@ -1938,6 +1938,11 @@ _GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation) { __isOrientationChanged = true; + if (GetCore().IsFocusModeStateEnabled()) + { + GetCore().SetFocusDuringOrientationChange(); + } + _ControlImpl::OnChangeLayout(orientation); } diff --git a/src/ui/controls/FUiCtrl_ListViewImpl.cpp b/src/ui/controls/FUiCtrl_ListViewImpl.cpp index 6bedcd6..f6354a9 100644 --- a/src/ui/controls/FUiCtrl_ListViewImpl.cpp +++ b/src/ui/controls/FUiCtrl_ListViewImpl.cpp @@ -1793,6 +1793,11 @@ _ListViewImpl::OnChangeLayout(_ControlOrientation orientation) { __isOrientationChanged = true; + if (GetCore().IsFocusModeStateEnabled()) + { + GetCore().SetFocusDuringOrientationChange(); + } + _ControlImpl::OnChangeLayout(orientation); } diff --git a/src/ui/controls/FUiCtrl_TableView.cpp b/src/ui/controls/FUiCtrl_TableView.cpp index 3c8fd73..b597d63 100644 --- a/src/ui/controls/FUiCtrl_TableView.cpp +++ b/src/ui/controls/FUiCtrl_TableView.cpp @@ -1428,6 +1428,12 @@ _TableView::GetVisualElementValueAnimation(const Tizen::Base::String& keyName) c return pAnimation; } +void +_TableView::SetFocusDuringOrientationChange(void) +{ + __pTableViewPresenter->SetFocusDuringOrientationChange(); +} + bool _TableView::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { diff --git a/src/ui/controls/FUiCtrl_TableViewPresenter.cpp b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp index b3b1fe4..db04ae1 100644 --- a/src/ui/controls/FUiCtrl_TableViewPresenter.cpp +++ b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp @@ -6079,6 +6079,7 @@ _TableViewPresenter::OnDrawFocus(void) void _TableViewPresenter::OnFocusModeStateChanged(void) { + __isFocusedDuringOrientationChange = false; __focusItemTag.groupIndex = -1; __focusItemTag.itemIndex = -1; __isRestoreFocus = false; @@ -6207,6 +6208,15 @@ _TableViewPresenter::FireItemTouchReleasedEventDuringPressing(int groupIndex, in } } +void +_TableViewPresenter::SetFocusDuringOrientationChange(void) +{ + if (__focusItemTag.groupIndex != -1) + { + __isFocusedDuringOrientationChange = true; + } +} + bool _TableViewSectionStringAlignment::operator== (const _TableViewSectionStringAlignment& rhs) const { diff --git a/src/ui/inc/FUiCtrl_TableView.h b/src/ui/inc/FUiCtrl_TableView.h index bd69de6..daabc48 100644 --- a/src/ui/inc/FUiCtrl_TableView.h +++ b/src/ui/inc/FUiCtrl_TableView.h @@ -238,6 +238,7 @@ public: virtual void OnChildDetached(const _Control& child); result SetTableViewStatusChanged(bool changed); + void SetFocusDuringOrientationChange(void); // VE Value Animation Tizen::Ui::Animations::VisualElementValueAnimation* GetVisualElementValueAnimation(const Tizen::Base::String& keyName) const; diff --git a/src/ui/inc/FUiCtrl_TableViewPresenter.h b/src/ui/inc/FUiCtrl_TableViewPresenter.h index 1c63a60..d0a0a17 100644 --- a/src/ui/inc/FUiCtrl_TableViewPresenter.h +++ b/src/ui/inc/FUiCtrl_TableViewPresenter.h @@ -305,6 +305,8 @@ public: void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex); + void SetFocusDuringOrientationChange(void); + protected: virtual float ScrollToInternal(float targetPosition); virtual void FadeInScrollBar(void);