(Indicator) Supported indicator animation to show/hide 65/19965/1
authorSinjae Lee <sinjae4b.lee@samsung.com>
Tue, 22 Apr 2014 10:42:26 +0000 (19:42 +0900)
committerAndrew Cox <andrew.cox@partner.samsung.com>
Wed, 23 Apr 2014 19:03:29 +0000 (20:03 +0100)
[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 <andrew.cox@partner.samsung.com>
Change-Id: I69812b3e231b5711f5cdcad8b22e6ff50447d1cc

adaptors/tizen/internal/common/window-impl.cpp

index f2c7607..6ebedd5 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali/public-api/render-tasks/render-task.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 #include <dali/public-api/adaptor-framework/common/orientation.h>
+#include <dali/public-api/animation/animation.h>
 
 // INTERNAL HEADERS
 #include <internal/common/ecore-x/window-render-surface.h>
 #include <internal/common/window-visibility-observer.h>
 #include <internal/common/orientation-impl.h>
 
+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();
     }
   }