Modified round effect on Sectiontableview and fixed highlight effect when tab item...
authoryouseong.ji <youseong.ji@samsung.com>
Sun, 24 Mar 2013 15:20:43 +0000 (00:20 +0900)
committeryouseong.ji <youseong.ji@samsung.com>
Sun, 24 Mar 2013 16:11:04 +0000 (01:11 +0900)
Change-Id: Id26e9b4f3b74bcb19dd688a685646fa2ee075008
Signed-off-by: youseong.ji <youseong.ji@samsung.com>
res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_bottom_focus.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_center_focus.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_focus.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top_ef.#.png [changed mode: 0755->0644]
res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top_focus.#.png [new file with mode: 0644]
src/ui/controls/FUiCtrl_TableViewItem.cpp
src/ui/controls/FUiCtrl_TableViewPresenter.cpp
src/ui/inc/FUiCtrl_TableViewItem.h
src/ui/resource/FUi_ResourceTableViewConfig.cpp

diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_bottom_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_bottom_focus.#.png
new file mode 100644 (file)
index 0000000..19b00a3
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_bottom_focus.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_center_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_center_focus.#.png
new file mode 100644 (file)
index 0000000..408f81c
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_center_focus.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_focus.#.png
new file mode 100644 (file)
index 0000000..4b7603a
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_focus.#.png differ
old mode 100755 (executable)
new mode 100644 (file)
index dafa6a2..0904345
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top_ef.#.png and b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top_focus.#.png
new file mode 100644 (file)
index 0000000..20595d4
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top_focus.#.png differ
index 6822bc1..11029fd 100644 (file)
@@ -182,6 +182,7 @@ _TableViewItem::_TableViewItem(float itemHeight)
        , __itemChanged(true)
        , __reorderMode(false)
        , __itemSelected(false)
+       , __itemTouchMoved(false)
        , __childMarginState(false)
        , __annexStyle(TABLE_VIEW_ANNEX_STYLE_NORMAL)
        , __drawingStatus(TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL)
@@ -214,7 +215,9 @@ _TableViewItem::_TableViewItem(float itemHeight)
        , __animationCount(0)
        , __pAccessibilityElement(null)
        , __pPressedTimer(null)
+       , __pReleasedTimer(null)
        , __isPressedTimerEnabled(false)
+       , __isReleasedTimerEnabled(false)
        , __pressedControl(TABLE_VIEW_ITEM_PRESSED_NONE)
        , __pCheckedTimer(null)
        , __isCheckedTimerEnabled(false)
@@ -339,7 +342,7 @@ _TableViewItem::~_TableViewItem()
        delete __pFadeInOutItemtAnimation;
        __pFadeInOutItemtAnimation = null;
 
-       if (__isPressedTimerEnabled)
+       if (__isPressedTimerEnabled && __pPressedTimer != null)
        {
                __pPressedTimer->Cancel();
        }
@@ -347,6 +350,14 @@ _TableViewItem::~_TableViewItem()
        delete __pPressedTimer;
        __pPressedTimer = null;
 
+       if (__isReleasedTimerEnabled && __pReleasedTimer != null)
+       {
+               __pReleasedTimer->Cancel();
+       }
+
+       delete __pReleasedTimer;
+       __pReleasedTimer = null;
+
        if (__isCheckedTimerEnabled)
        {
                __pCheckedTimer->Cancel();
@@ -989,8 +1000,7 @@ _TableViewItem::FireItemEvent(bool selectedItem)
 
        if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK)
                || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO)
-               || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING)
-               || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER))
+               || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING))
        {
                if (IsChecked())
                {
@@ -1008,6 +1018,24 @@ _TableViewItem::FireItemEvent(bool selectedItem)
                        eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_MORE;
                }
        }
+       else if(__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+       {
+               if (selectedItem)
+               {
+                       eventType = TABLEVIEW_NOTIFY_TYPE_SELECTED_ITEM;
+               }
+               else
+               {
+                       if (IsChecked())
+                       {
+                               eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_CHECK;
+                       }
+                       else
+                       {
+                               eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_UNCHECK;
+                       }
+               }
+       }
 
        if (__isItemTapSoundEnabled)
        {
@@ -1081,6 +1109,86 @@ _TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchi
                StopTouchPressedTimer();
        }
 
+       if(!__itemTouchMoved && !IsContextItem())
+       {
+               if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM)
+               {
+                       __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
+                       SetItemChanged(true);
+                       Invalidate();
+               }
+               else if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX)
+               {
+                       if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
+                       {
+                               __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
+                               SetChecked(true);
+                               DrawAnnexStyle();
+                       }
+                       else if (__annexStyle != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING &&
+                                               __annexStyle != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+                       {
+                               __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
+                               SetItemChanged(true);
+                               Invalidate();
+                       }
+               }
+               else
+               {
+                       if(__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL)
+                       {
+                               __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
+                               SetItemChanged(true);
+                               Invalidate();
+                       }
+               }
+
+               if (&source == this)
+               {
+                       __pressedControl = TABLE_VIEW_ITEM_PRESSED_ITEM;
+               }
+               else if (&source == __pItemAnnex)
+               {
+                       __pressedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX;
+               }
+               else if (IsIndividualSelectionEnabled(source))
+               {
+                       __pressedControl = TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL;
+               }
+               else
+               {
+                       __pressedControl = TABLE_VIEW_ITEM_PRESSED_NONE;
+               }
+
+               StartTouchReleasedTimer();
+
+               return true;
+       }
+
+       if (&source == this)
+       {
+               __pressedControl = TABLE_VIEW_ITEM_PRESSED_ITEM;
+       }
+       else if (&source == __pItemAnnex)
+       {
+               __pressedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX;
+       }
+       else if (IsIndividualSelectionEnabled(source))
+       {
+               __pressedControl = TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL;
+       }
+       else
+       {
+               __pressedControl = TABLE_VIEW_ITEM_PRESSED_NONE;
+       }
+
+       FireItemTouchRelease();
+       return true;
+}
+
+void
+_TableViewItem::FireItemTouchRelease()
+{
        bool fireItemEvent = false;
        bool selectedItem = true;
 
@@ -1091,7 +1199,7 @@ _TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchi
                bool checked = IsChecked();
                fireItemEvent = true;
 
-               if (&source == this)
+               if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM)
                {
                        if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK)
                                || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO)
@@ -1101,48 +1209,29 @@ _TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchi
                                SetCheckedAnimationEnabled(!checked);
                        }
                }
-               else if(&source == __pItemAnnex)
+               else if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX)
                {
-                       if (__selectionStyle == TABLE_VIEW_ITEM_SELECTION_STYLE_WHOLE)
+                       if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
                        {
-                               if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
-                               {
-                                       SetChecked(false);
-                                       DrawAnnexStyle();
-                                       selectedItem = false;
-                               }
-                               else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING ||
-                                       __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
-                               {
-                                       AdjustAnnexOnOffHandlerPosition();
-                               }
-                               else
-                               {
-                                       SetChecked(!checked);
-                                       SetCheckedAnimationEnabled(!checked);
-                               }
+                               SetChecked(false);
+                               DrawAnnexStyle();
+                               selectedItem = false;
+                       }
+                       else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING ||
+                               __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+                       {
+                               AdjustAnnexOnOffHandlerPosition();
+                               selectedItem = false;
                        }
                        else
                        {
                                SetChecked(!checked);
                                SetCheckedAnimationEnabled(!checked);
-
-                               if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
-                               {
-                                       SetChecked(false);
-                                       DrawAnnexStyle();
-                                       selectedItem = false;
-                               }
-                               else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING ||
-                                       __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
-                               {
-                                       AdjustAnnexOnOffHandlerPosition();
-                               }
                        }
                }
                else
                {
-                       if(!IsIndividualSelectionEnabled(source))
+                       if(__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL)
                        {
                                if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK)
                                        || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO)
@@ -1164,7 +1253,7 @@ _TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchi
        }
        else
        {
-               if (&source == __pItemAnnex)
+               if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX)
                {
                        if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING ||
                                __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
@@ -1177,13 +1266,12 @@ _TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchi
 
        __itemSelected = false;
        __annexOnOffHandlerMoved = false;
+       __itemTouchMoved = false;
 
        if (fireItemEvent)
        {
                FireItemEvent(selectedItem);
        }
-
-       return true;
 }
 
 bool
@@ -1244,6 +1332,8 @@ _TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo
                }
        }
 
+       __itemTouchMoved = true;
+
        return retVal;
 }
 
@@ -1261,6 +1351,7 @@ _TableViewItem::OnTouchCanceled(const _Control& source, const _TouchInfo& touchi
        }
 
        __annexOnOffHandlerMoved = false;
+       __itemTouchMoved = false;
 
        __itemSelected = false;
        __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
@@ -1398,52 +1489,43 @@ _TableViewItem::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
        {
                __isPressedTimerEnabled = false;
 
-               __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
-
                if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM)
                {
+                       __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
                        SetItemChanged(true);
                        Invalidate();
                }
                else if(__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX)
                {
-                       if (__selectionStyle == TABLE_VIEW_ITEM_SELECTION_STYLE_WHOLE)
+                       if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
                        {
-                               if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
-                               {
-                                       SetChecked(true);
-                                       DrawAnnexStyle();
-                               }
-                               else if (__annexStyle != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING &&
-                                                       __annexStyle != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
-                               {
-                                       SetItemChanged(true);
-                                       Invalidate();
-                               }
+                               __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
+                               SetChecked(true);
+                               DrawAnnexStyle();
                        }
-                       else
+                       else if (__annexStyle != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING &&
+                                               __annexStyle != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
                        {
-                               if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED)
-                               {
-                                       SetChecked(true);
-                                       DrawAnnexStyle();
-                               }
-                               else
-                               {
-                                       SetItemChanged(true);
-                                       Invalidate();
-                               }
+                               __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL;
+                               SetItemChanged(true);
+                               Invalidate();
                        }
                }
                else
                {
                        if(__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL)
                        {
+                               __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED;
                                SetItemChanged(true);
                                Invalidate();
                        }
                }
        }
+       else if(&timer == __pReleasedTimer)
+       {
+               __isReleasedTimerEnabled = false;
+               FireItemTouchRelease();
+       }
 }
 
 result
@@ -1505,6 +1587,39 @@ CATCH:
        return r;
 }
 
+result
+_TableViewItem::StartTouchReleasedTimer()
+{
+       result r = E_SUCCESS;
+
+       if (__pReleasedTimer == null)
+       {
+               __pReleasedTimer = new (std::nothrow) Timer();
+               SysTryCatch(NID_UI_CTRL, __pReleasedTimer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+               r = __pReleasedTimer->Construct(*this);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage);
+       }
+
+       r = __pReleasedTimer->Start(TOUCH_RELREASED_DURATION);
+       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage);
+
+       __isReleasedTimerEnabled = true;
+
+       return r;
+
+CATCH:
+       if (__isReleasedTimerEnabled && __pReleasedTimer != null)
+       {
+               __pReleasedTimer->Cancel();
+       }
+
+       delete __pReleasedTimer;
+       __pReleasedTimer = null;
+
+       return r;
+}
+
 void
 _TableViewItem::StopTouchPressedTimer(void)
 {
@@ -1755,32 +1870,30 @@ _TableViewItem::DrawItemBackground(void)
        {
                pCanvas = __pBitmapVisualElement->GetCanvasN();
                SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
-               pCanvas->SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
+               pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
                pCanvas->Clear();
        }
 
-       if(__enabledState)
+       if(pDrawBitmap != null && __enabledState)
        {
-               if(pDrawBitmap != null)
+               if(pCanvas != null)
                {
-                       if(pCanvas != null)
-                       {
-                               __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
-                               SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
+                       __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
+                       DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pDrawBitmap);
+               }
+       }
 
-                               DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pDrawBitmap);
-                       }
+       if(__enabledState)
+       {
+               if (__pDrawingProperty->sectionStyleEnabled == true)
+               {
+                       DrawSectionStyleBackground();
                }
                else if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER)
                {
                        SetBackgroundColor(Color(0, 0, 0, 0));
                        __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
                }
-               else if (__pDrawingProperty->sectionStyleEnabled == true)
-               {
-                       DrawSectionStyleBackground();
-               }
                else
                {
                        SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]);
@@ -1802,6 +1915,7 @@ _TableViewItem::DrawItemBackground(void)
                {
                        GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor);
                        SetBackgroundColor(bgColor);
+                       __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
 
                        if (__pDrawingProperty->groupedLookEnabled == true)
                        {
@@ -1872,6 +1986,8 @@ _TableViewItem::DrawSectionStyleBackground(void)
        Bitmap* pReplacementSectionBg = null;
        Color bgColor = __colorItemBg[__drawingStatus];
        FloatRectangle bounds = GetBoundsF();
+       float dividerHeight = 0.0f;
+
        result r = E_SUCCESS;
 
        pCanvas = GetVisualElement()->GetCanvasN();
@@ -1919,10 +2035,10 @@ _TableViewItem::DrawSectionStyleBackground(void)
                pReplacementSectionBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
        }
 
-       DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg);
-
        if (__drawingStatus != TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL)
        {
+               Color pressColor;
+
                if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE)
                {
                        r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressedBg);
@@ -1939,22 +2055,18 @@ _TableViewItem::DrawSectionStyleBackground(void)
                {
                        r = GET_BITMAP_CONFIG_N(TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSectionPressedBg);
                }
-       }
-       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
-
-       if (__drawingStatus != TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL)
-       {
-               Color pressColor;
-               int dividerHeightInt = 0;
-               float dividerHeight = 0.0f;
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SectionStyle image load failed");
 
                GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_PRESSED, pressColor);
                pSectionPressedBg = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pSectionBg, Color::GetColor(COLOR_ID_MAGENTA), pressColor);
-               GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, dividerHeightInt);
-               dividerHeight = _CoordinateSystemUtils::ConvertToFloat(dividerHeightInt);
+               GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, dividerHeight);
 
                DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height-dividerHeight * 2), *pSectionPressedBg);
        }
+       else
+       {
+               DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg);
+       }
 
        if (__pDrawingProperty->groupedLookEnabled == true)
        {
@@ -2522,7 +2634,7 @@ _TableViewItem::DrawAnnexOnOffHandler(float position)
        }
 
        nextHandlerBounds = handlerBounds.x + (position - __annexOnOffTouchPosition);
-       annexAbsoluteBoundsStart = __pItemAnnex->GetBounds().x;
+       annexAbsoluteBoundsStart = __pItemAnnex->GetBoundsF().x;
        annexAbsoluteBoundsEnd = __pItemAnnex->GetBoundsF().x + __pItemAnnex->GetBoundsF().width + annexMargin;
 
        if((annexAbsoluteBoundsStart + nextHandlerBounds + handlerBounds.width)  < annexAbsoluteBoundsEnd &&
@@ -2697,6 +2809,14 @@ CATCH:
 void
 _TableViewItem::DrawItemDivider(void)
 {
+       FloatRectangle dividerBottomBounds;
+       FloatRectangle dividerTopBounds;
+       Color dividerColor;
+       Color underLineColor;
+       FloatRectangle bounds;
+       FloatPoint topPoint;
+       FloatPoint bottomPoint;
+
        if (__pDrawingProperty->itemDividerEnabled == false ||
                __itemType == TABLE_VIEW_ITEM_TYPE_HEADER ||
                __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER ||
@@ -2723,12 +2843,10 @@ _TableViewItem::DrawItemDivider(void)
                }
                else
                {
-                       Color underLineColor;
-                       FloatRectangle bounds = GetBoundsF();
-
                        float lineHeight = 0.0f;
                        float lineLeftMargin = 0.0f;
                        float lineBottomMargin = 0.0f;
+                       bounds = GetBoundsF();
 
                        if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL)
                        {
@@ -2738,54 +2856,62 @@ _TableViewItem::DrawItemDivider(void)
                        {
                                GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_PRESSED, underLineColor);
                        }
+
                        GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight);
                        GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin);
                        GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineBottomMargin);
 
-                       if(__pItemDivider != null)
-                       {
-                               __pItemDivider->SetBounds(FloatRectangle(lineLeftMargin, bounds.height - lineBottomMargin, bounds.width - lineLeftMargin * 2, lineHeight));
-                               __pItemDivider->SetBackgroundColor(underLineColor);
-                               __pItemDivider->SetVisibleState(true);
-                               __pItemDivider->Invalidate();
-                       }
+                       bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, bounds.height - lineBottomMargin));
+                       dividerBottomBounds = FloatRectangle(bottomPoint.x, bottomPoint.y, bounds.width - lineLeftMargin * 2, lineHeight);
                }
        }
        else
        {
-               Color dividerColor;
-               FloatRectangle bounds = GetBoundsF();
-
                float lineLeftMargin = 0.0f;
                float lineHeight = 0.0f;
                int groupIndex = -1;
                int itemIndex = -1;
+               bounds = GetBoundsF();
+
+               GetItemIndex(groupIndex, itemIndex);
+               if (itemIndex < 1)
+               {
+                       __pItemTopDivider->SetVisibleState(false);
+               }
 
                GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL, dividerColor);
                GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin);
                GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight);
+               underLineColor = __pDrawingProperty->dividerColor;
 
-               __pItemDivider->SetBounds(FloatRectangle(lineLeftMargin, (bounds.height - lineHeight), bounds.width - lineLeftMargin * 2, lineHeight));
-               __pItemDivider->SetBackgroundColor(__pDrawingProperty->dividerColor);
-               __pItemDivider->Invalidate();
+               topPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, 0.0f));
+               bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, (bounds.height - lineHeight)));
+               dividerTopBounds.SetBounds(topPoint.x, topPoint.y, bounds.width - lineLeftMargin * 2, lineHeight);
+               dividerBottomBounds.SetBounds(bottomPoint.x, bottomPoint.y, bounds.width - lineLeftMargin * 2, lineHeight);
+       }
 
-               GetItemIndex(groupIndex, itemIndex);
-               if (itemIndex != 0)
+       if (__pItemDivider != null )
+       {
+               if(__pItemDivider->GetVisibleState())
                {
-                       __pItemTopDivider->SetBounds(FloatRectangle(lineLeftMargin, 0.0f, bounds.width - lineLeftMargin * 2, lineHeight));
-                       __pItemTopDivider->SetBackgroundColor(dividerColor);
-                       __pItemTopDivider->Invalidate();
+                       __pItemDivider->SetBounds(dividerBottomBounds);
+                       __pItemDivider->SetBackgroundColor(underLineColor);
+                       __pItemDivider->Invalidate();
                }
-       }
 
-       if (__pItemDivider != null)
-       {
                _AccessibilityContainer* pContainer = __pItemDivider->GetAccessibilityContainer();
                pContainer->Activate(false);
        }
 
        if (__pItemTopDivider != null)
        {
+               if(__pItemTopDivider->GetVisibleState())
+               {
+                       __pItemTopDivider->SetBounds(dividerTopBounds);
+                       __pItemTopDivider->SetBackgroundColor(dividerColor);
+                       __pItemTopDivider->Invalidate();
+               }
+
                _AccessibilityContainer* pContainer = __pItemTopDivider->GetAccessibilityContainer();
                pContainer->Activate(false);
        }
index 9e6e00d..51b29a3 100644 (file)
@@ -4545,12 +4545,18 @@ _TableViewPresenter::SetLoadedItemsVisibleFromPosition(float position, bool visi
 
                if (visible)
                {
-                       if (_FloatCompareGE(position, itemBounds.y) && !_FloatCompareGE(position, itemBounds.y + itemBounds.height))
+                       if (_FloatCompare(position, itemBounds.y) && !_FloatCompareGE(position, itemBounds.y + itemBounds.height))
                        {
                                ShowTableViewCapturedItem(current.groupIndex, current.itemIndex, position - itemBounds.y);
                                pItem->SetVisibleState(false);
                                break;
                        }
+                       else if(_FloatCompareGE(position, itemBounds.y) && !_FloatCompareGE(position, itemBounds.y + itemBounds.height))
+                       {
+                               ShowTableViewCapturedItem(current.groupIndex, current.itemIndex, position - itemBounds.y);
+                               pItem->SetVisibleState(true);
+                               break;
+                       }
                        else
                        {
                                pItem->SetVisibleState(true);
index 3349698..a4830ca 100644 (file)
@@ -298,6 +298,7 @@ protected:
 
        result StartTouchPressedTimer(const _Control& source, const _TouchInfo& touchinfo);
        void StopTouchPressedTimer(void);
+       result StartTouchReleasedTimer(void);
 
 private:
        _TableViewItem(const _TableViewItem&);
@@ -334,6 +335,7 @@ private:
        result CreateItemCover(void);
        result CreateItemDivider(void);
        result CreateItemAnnexDivider(void);
+       void FireItemTouchRelease(void);
 
 private:
        void* __pAppInfo;
@@ -347,6 +349,7 @@ private:
        bool __itemChanged;
        bool __reorderMode;
        bool __itemSelected;
+       bool __itemTouchMoved;
        bool __childMarginState;
 
        TableViewAnnexStyle __annexStyle;
@@ -399,7 +402,9 @@ private:
        Tizen::Ui::_AccessibilityElement* __pAccessibilityElement;
 
        Tizen::Base::Runtime::Timer* __pPressedTimer;
+       Tizen::Base::Runtime::Timer* __pReleasedTimer;
        bool __isPressedTimerEnabled;
+       bool __isReleasedTimerEnabled;
        TableViewItemPressedControl __pressedControl;
 
        Tizen::Base::Runtime::Timer* __pCheckedTimer;
@@ -430,6 +435,7 @@ private:
        static const int DEFAULT_CAPTURED_CONTROL_COUNT = 10;
        static const int CHECKED_ANIMATION_DURATION = 30;
        static const int TOUCH_PRESSED_DURATION = 100;
+       static const int TOUCH_RELREASED_DURATION = 50;
        static const int MAX_CHECKED_COUNT = 10;
        static const float INSENSITIVE = 0.16f;
        static const float SENSITIVE = 0.08f;
index ea6f2b8..3a9737b 100644 (file)
@@ -62,21 +62,21 @@ START_UI_CONFIG(TABLEVIEW);
        ADD_IMAGE_CONFIG(GROUPITEM_BG_NORMAL, #00_indexlist_bg.#.png);
        ADD_IMAGE_CONFIG(GROUPITEM_BG_EFFECT, #00_indexlist_bg_ef.#.png);
        ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_NORMAL, #00_list_group_bg.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_PRESSED, #00_list_group_bg_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_HIGHLIGHTED, #00_list_group_bg_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_COVER, #00_list_group_press_bg.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_PRESSED, #00_list_group_press_bg.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_HIGHLIGHTED, #00_list_group_press_bg.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_COVER, #00_list_group_bg_ef.#.png);
        ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_NORMAL, #00_list_group_bg_top.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_PRESSED, #00_list_group_bg_top_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_HIGHLIGHTED, #00_list_group_bg_top_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_COVER, #00_list_group_press_bg_top.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_PRESSED, #00_list_group_press_bg_top.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_HIGHLIGHTED, #00_list_group_press_bg_top.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_COVER, #00_list_group_bg_top_ef.#.png);
        ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_NORMAL, #00_list_group_bg_center.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_PRESSED, #00_list_group_bg_center_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_HIGHLIGHTED, #00_list_group_bg_center_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_COVER, #00_list_group_press_bg_center.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_PRESSED, #00_list_group_press_bg_center.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_HIGHLIGHTED, #00_list_group_press_bg_center.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_COVER, #00_list_group_bg_center_ef.#.png);
        ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_NORMAL, #00_list_group_bg_bottom.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_PRESSED, #00_list_group_bg_bottom_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_HIGHLIGHTED, #00_list_group_bg_bottom_ef.#.png);
-       ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_COVER, #00_list_group_press_bg_bottom.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_PRESSED, #00_list_group_press_bg_bottom.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_HIGHLIGHTED, #00_list_group_press_bg_bottom.#.png);
+       ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_COVER, #00_list_group_bg_bottom_ef.#.png);
        ADD_IMAGE_CONFIG(CHECKBOX_BG_NORMAL, #00_check_bg.png);
        ADD_IMAGE_CONFIG(CHECKBOX_BG_PRESSED, #00_check_bg_press.png);
        ADD_IMAGE_CONFIG(CHECKBOX_BG_HIGHLIGHTED, #00_check_bg_press.png);