}
void
+_TableView::FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex)
+{
+ __pTableViewPresenter->FireItemTouchReleasedEventDuringPressing(groupIndex, itemIndex);
+}
+
+void
_TableView::OnDraw(void)
{
__pTableViewPresenter->Draw();
{
StopTouchReleasedTimer();
- __itemSelected = true;
-
- FireItemTouchReleased();
+ _TableView* pParent = dynamic_cast<_TableView*>(GetParent());
+ if (pParent != null)
+ {
+ int groupIndex = -1;
+ int itemIndex = -1;
+ GetItemIndex(groupIndex, itemIndex);
+ pParent->FireItemTouchReleasedEventDuringPressing(groupIndex, itemIndex);
+ }
}
else
{
, __scrollPositionOnFlickStarted(0)
, __isAnimationCallbackBlocked(false)
, __lockLoadItemWithScroll(false)
+ , __itemTouchReleasedEventState(TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL)
{
__sweptItemTag.itemIndex = -1;
__sweptItemTag.groupIndex = -1;
__statusChangedFlag = true;
+ if (__itemTouchReleasedEventState == TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_FIRE)
+ {
+ __itemTouchReleasedEventState = TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_UPDATE_TABLE_VIEW;
+ }
}
return E_SUCCESS;
return false;
}
+void
+_TableViewPresenter::FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex)
+{
+ TableViewItemTag fireItemPos;
+ fireItemPos.groupIndex = groupIndex;
+ fireItemPos.itemIndex = itemIndex;
+
+ __itemTouchReleasedEventState = TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_FIRE;
+ _TableViewItem* pItem = FindItem(fireItemPos);
+ if (pItem != null)
+ {
+ pItem->FireItemTouchReleased();
+ }
+
+ // for new item after UpdateTableView.
+ pItem = FindItem(fireItemPos);
+ if (pItem != null)
+ {
+ if (__itemTouchReleasedEventState == TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_UPDATE_TABLE_VIEW)
+ {
+ __itemTouchReleasedEventState = TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL;
+ }
+ else
+ {
+ pItem->SetSelectionState(true);
+ pItem->FireItemTouchPressed();
+ }
+ }
+}
+
bool
_TableViewSectionStringAlignment::operator== (const _TableViewSectionStringAlignment& rhs) const
{
return false;
}
+
bool
_TableViewSectionStringAlignment::operator!= (const _TableViewSectionStringAlignment& rhs) const
{
result SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment);
HorizontalAlignment GetSectionFooterTextHorizontalAlignment(int sectionIndex) const;
+ void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex);
+
virtual void OnDraw(void);
virtual void OnBoundsChanged(void);
bool IsAnnexOnOffSliding(void);
static float GetAnnexWidth(TableViewAnnexStyle style);
+ void FireItemTouchReleased(void);
+ void FireItemTouchPressed(void);
+
// Accessibility
virtual void SetAccessibilityElement(void);
Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void);
result CreateOnOffButton(void);
result CreateDetailButton(void);
- void FireItemTouchReleased(void);
- void FireItemTouchPressed(void);
-
private:
void* __pAppInfo;
int __refCount;
TABLE_VIEW_ITEM_ALIGNMENT_BOTTOM
};
+enum ItemTouchReleasedEventState
+{
+ TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL = 0,
+ TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_FIRE,
+ TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_UPDATE_TABLE_VIEW
+};
+
struct _TableViewReorderInfo
{
int groupIndex;
void BlockAnimationCallback(bool blocked);
+ void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex);
+
protected:
virtual float ScrollToInternal(float targetPosition);
virtual void FadeInScrollBar(void);
bool __isAnimationCallbackBlocked;
bool __lockLoadItemWithScroll;
+ int __itemTouchReleasedEventState;
+
static const int TABLEVIEW_MAX_ITEM_COUNT = 30;
static const int REORDER_SCROLL_ANIMATION_TIMER_DURATION = 10;
static const float REORDER_SCROLL_ANIMATION_DISTANCE = 10.0f;