From c8a6666002a7dfbb87f1c459d286455f8ebbc765 Mon Sep 17 00:00:00 2001 From: Sinjae Lee Date: Tue, 22 Apr 2014 19:42:26 +0900 Subject: [PATCH] (Indicator) Supported indicator animation to show/hide [Problem] Need to show animation of indicator according to new UX [Cause] Non-implementation [Solution] Implemented sliding animation for indicator actor Signed-off-by: Andrew Cox Change-Id: I69812b3e231b5711f5cdcad8b22e6ff50447d1cc --- adaptors/tizen/internal/common/window-impl.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/adaptors/tizen/internal/common/window-impl.cpp b/adaptors/tizen/internal/common/window-impl.cpp index f2c7607..6ebedd5 100644 --- a/adaptors/tizen/internal/common/window-impl.cpp +++ b/adaptors/tizen/internal/common/window-impl.cpp @@ -26,6 +26,7 @@ #include #include #include +#include // INTERNAL HEADERS #include @@ -34,6 +35,12 @@ #include #include +namespace +{ +const float INDICATOR_ANIMATION_DURATION( 0.18f ); // 180 milli seconds +const float INDICATOR_SHOW_Y_POSITION( 0.0f ); +const float INDICATOR_HIDE_Y_POSITION( -52.0f ); +} namespace Dali { @@ -361,12 +368,18 @@ void Window::DoShowIndicator( bool show, Dali::Window::WindowOrientation lastOri } else { - actor.SetVisible( true ); + // show animation + Dali::Animation anim = Dali::Animation::New(INDICATOR_ANIMATION_DURATION); + anim.MoveTo(actor, 0, INDICATOR_SHOW_Y_POSITION, 0); + anim.Play(); } } else { - actor.SetVisible( false ); + // hide animation + Dali::Animation anim = Dali::Animation::New(INDICATOR_ANIMATION_DURATION); + anim.MoveTo(actor, 0, INDICATOR_HIDE_Y_POSITION, 0); + anim.Play(); } } -- 2.7.4