SetTouchPressThreshold(INSENSITIVE);
- __pMoveItemAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryCatch(NID_UI_CTRL, __pMoveItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
-
- __pMoveItemAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut"));
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pMoveItemAnimation->SetVisualElementAnimationTickEventListener(this);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pMoveItemAnimation->SetVisualElementAnimationStatusEventListener(this);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pZoomInOutItemAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryCatch(NID_UI_CTRL, __pZoomInOutItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
-
- __pZoomInOutItemAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseIn"));
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pZoomInOutItemAnimation->SetVisualElementAnimationTickEventListener(this);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pZoomInOutItemAnimation->SetVisualElementAnimationStatusEventListener(this);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pFadeInOutItemtAnimation = new (std::nothrow) VisualElementValueAnimation;
- SysTryCatch(NID_UI_CTRL, __pFadeInOutItemtAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
-
- __pFadeInOutItemtAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseIn"));
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pFadeInOutItemtAnimation->SetVisualElementAnimationTickEventListener(this);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- __pFadeInOutItemtAnimation->SetVisualElementAnimationStatusEventListener(this);
- r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
return r;
CATCH:
__pHighlightVisualElement = null;
}
- delete __pMoveItemAnimation;
- __pMoveItemAnimation = null;
-
- delete __pZoomInOutItemAnimation;
- __pZoomInOutItemAnimation = null;
-
- delete __pFadeInOutItemtAnimation;
- __pFadeInOutItemtAnimation = null;
-
return r;
}
}
bool
-_TableViewItem::MoveItem(FloatPoint position, int duration, int delay, Tizen::Base::String* pName)
+_TableViewItem::MoveItem(FloatPoint position, int duration, int delay)
{
_VisualElement* pVisualElement = GetVisualElement();
-
+ VisualElementValueAnimation* pAnimation = null;
String animationName = L"MOVE_ITEM";
+ result r = E_SUCCESS;
+
+ if (__pMoveItemAnimation == null)
+ {
+ __pMoveItemAnimation = new (std::nothrow) VisualElementValueAnimation;
+ SysTryCatch(NID_UI_CTRL, __pMoveItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+
+ __pMoveItemAnimation->SetVisualElementAnimationTickEventListener(this);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pMoveItemAnimation->SetVisualElementAnimationStatusEventListener(this);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
- VisualElementValueAnimation* pAnimation = __pMoveItemAnimation;
+ pAnimation = __pMoveItemAnimation;
+ pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut"));
pAnimation->SetDuration(duration);
pAnimation->SetDelay(delay);
pAnimation->SetStartValue(Variant(GetPositionF()));
pAnimation->SetEndValue(Variant(position));
- if (pName != null)
- {
- String* pUserData = new (std::nothrow) String(*pName);
- SysTryCatch(NID_UI_CTRL, pUserData, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
- if (pUserData != null)
- {
- pAnimation->SetUserData((void*)pUserData);
- }
- }
if (pVisualElement->AddAnimation(animationName, *pAnimation) != E_SUCCESS)
{
CATCH:
+ delete __pMoveItemAnimation;
+ __pMoveItemAnimation = null;
+
return false;
}
bool
-_TableViewItem::ZoomInOutItem(bool zoomOut, int duration, int delay, Tizen::Base::String* pName)
+_TableViewItem::ZoomInOutItem(bool zoomOut, int duration, int delay)
{
_VisualElement* pVisualElement = GetVisualElement();
-
+ VisualElementValueAnimation* pAnimation = null;
String animationName = L"ZOOM_IN_OUT_ITEM";
-
- VisualElementValueAnimation* pAnimation = __pZoomInOutItemAnimation;
-
FloatDimension itemSize = GetSizeF();
FloatDimension startValue;
FloatDimension endValue;
+ result r = E_SUCCESS;
+
+ if (__pZoomInOutItemAnimation == null)
+ {
+ __pZoomInOutItemAnimation = new (std::nothrow) VisualElementValueAnimation;
+ SysTryCatch(NID_UI_CTRL, __pZoomInOutItemAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
+
+ __pZoomInOutItemAnimation->SetVisualElementAnimationTickEventListener(this);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pZoomInOutItemAnimation->SetVisualElementAnimationStatusEventListener(this);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
+ pAnimation = __pZoomInOutItemAnimation;
if (zoomOut)
{
pAnimation->SetStartValue(Variant(startValue));
pAnimation->SetEndValue(Variant(endValue));
- if (pName != null)
- {
- String* pUserData = new (std::nothrow) String(*pName);
- SysTryCatch(NID_UI_CTRL, pUserData, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
- if (pUserData != null)
- {
- pAnimation->SetUserData((void*)pUserData);
- }
- }
-
if (pVisualElement->AddAnimation(animationName, *pAnimation) != E_SUCCESS)
{
return false;
return true;
CATCH:
+ delete __pZoomInOutItemAnimation;
+ __pZoomInOutItemAnimation = null;
return false;
}
bool
-_TableViewItem::FadeInOutItem(bool fadeOut, int duration, int delay, Tizen::Base::String* pName)
+_TableViewItem::FadeInOutItem(bool fadeOut, int duration, int delay)
{
_VisualElement* pVisualElement = GetVisualElement();
+ VisualElementValueAnimation* pAnimation = null;
+ String animationName = L"FADE_IN_OUT_ITEM";
+ float startValue = 0.0f;
+ float endValue = 1.0f;
+ result r = E_SUCCESS;
+
+ if (__pFadeInOutItemtAnimation == null)
+ {
+ __pFadeInOutItemtAnimation = new (std::nothrow) VisualElementValueAnimation;
+ SysTryCatch(NID_UI_CTRL, __pFadeInOutItemtAnimation != null, , E_OUT_OF_MEMORY, ("[E_OUT_OF_MEMORY] The memory is insufficient."));
- String animationName = L"FADE_IN_OUT_ITEM";;
+ __pFadeInOutItemtAnimation->SetVisualElementAnimationTickEventListener(this);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- VisualElementValueAnimation* pAnimation = __pFadeInOutItemtAnimation;
+ __pFadeInOutItemtAnimation->SetVisualElementAnimationStatusEventListener(this);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
- float startValue = 0.0f;
- float endValue = 1.0f;
+ pAnimation = __pFadeInOutItemtAnimation;
if (fadeOut)
{
pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName(L"EaseIn"));
}
+ pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseIn"));
pAnimation->SetDuration(duration);
pAnimation->SetDelay(delay);
pAnimation->SetStartValue(Variant(startValue));
pAnimation->SetEndValue(Variant(endValue));
- if (pName != null)
- {
- String* pUserData = new (std::nothrow) String(*pName);
- SysTryCatch(NID_UI_CTRL, pUserData, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
-
- if (pUserData != null)
- {
- pAnimation->SetUserData((void*)pUserData);
- }
- }
-
if (pVisualElement->AddAnimation(animationName, *pAnimation) != E_SUCCESS)
{
return false;
CATCH:
+ delete __pFadeInOutItemtAnimation;
+ __pFadeInOutItemtAnimation = null;
+
return false;
}