[Tizen] Animatable TextColor Property for TextLabel 08/144108/1
authorminho.sun <minho.sun@samsung.com>
Mon, 14 Aug 2017 11:05:19 +0000 (20:05 +0900)
committerminho.sun <minho.sun@samsung.com>
Mon, 14 Aug 2017 11:05:19 +0000 (20:05 +0900)
This reverts commit bb0612e1b86df21029ffb8cbf9c54b79636df1a4.

Change-Id: Ia13c9f90962a6e47328515078a92c8f38188b652

NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs
Tizen.NUI/src/public/BaseComponents/TextLabel.cs

index 8cd8f1d..626a48e 100755 (executable)
@@ -49,6 +49,9 @@ namespace HelloWorldTest
             Initialize();
         }
 
+        TextLabel pixelLabel;
+        TextLabel pointLabel;
+
         public void Initialize()
         {
             Window window = Window.Instance;
@@ -57,16 +60,16 @@ namespace HelloWorldTest
             window.KeyEvent += OnWindowKeyEvent;
             window.Resized += (obj, e) =>
             {
-                Tizen.Log.Debug("NUI", "Height: " + e.WindowSize.Height);
-                Tizen.Log.Debug("NUI", "Width: " + e.WindowSize.Width);
+                Tizen.Log.Fatal("NUI", "Height: " + e.WindowSize.Height);
+                Tizen.Log.Fatal("NUI", "Width: " + e.WindowSize.Width);
             };
 
-            TextLabel pixelLabel = new TextLabel("Test Pixel Size 32.0f");
+            pixelLabel = new TextLabel("Test Pixel Size 32.0f");
             pixelLabel.Position2D = new Position2D(10, 10);
             pixelLabel.PixelSize = 32.0f;
             window.Add(pixelLabel);
 
-            TextLabel pointLabel = new TextLabel("Test Point Size 32.0f");
+            pointLabel = new TextLabel("Test Point Size 32.0f");
             pointLabel.Position2D = new Position2D(10, 100);
             pointLabel.PointSize = 32.0f;
             window.Add(pointLabel);
@@ -98,7 +101,7 @@ namespace HelloWorldTest
             _view = new View();
             _view.Size2D = new Size2D(100, 100);
             _view.SizeWidth = 50;
-            Tizen.Log.Debug("NUI", "[1]_view SizeWidth=" + _view.SizeWidth);
+            Tizen.Log.Fatal("NUI", "[1]_view SizeWidth=" + _view.SizeWidth);
 
             _animation = new Animation
             {
@@ -112,22 +115,25 @@ namespace HelloWorldTest
             _animation.Finished += AnimationFinished;
 
             _view.SizeWidth = 50;
-            Tizen.Log.Debug("NUI", "[2]_view SizeWidth=" + _view.SizeWidth);
+            Tizen.Log.Fatal("NUI", "[2]_view SizeWidth=" + _view.SizeWidth);
         }
 
         public void AnimationFinished(object sender, EventArgs e)
         {
-            Tizen.Log.Debug("NUI", "AnimationFinished()! cnt=" + (cnt));
+            Tizen.Log.Fatal("NUI", "AnimationFinished()! cnt=" + (cnt));
             if (_animation)
             {
-                Tizen.Log.Debug("NUI", "Duration= " + _animation.Duration + "EndAction= " + _animation.EndAction);
+                Tizen.Log.Fatal("NUI", "Duration= " + _animation.Duration + "EndAction= " + _animation.EndAction);
             }
             _view.SizeWidth = 50;
-            Tizen.Log.Debug("NUI", "[3]_view SizeWidth=" + _view.SizeWidth);
+            Tizen.Log.Fatal("NUI", "[3]_view SizeWidth=" + _view.SizeWidth);
         }
 
         public void OnWindowKeyEvent(object sender, Window.KeyEventArgs e)
         {
+            Tizen.Log.Fatal("NUI", "e.Key.KeyPressedName=" + e.Key.KeyPressedName);
+
+
             if (e.Key.State == Key.StateType.Down)
             {
                 if (e.Key.KeyPressedName == "Up")
@@ -136,8 +142,11 @@ namespace HelloWorldTest
                     {
                         _animation.Finished += AnimationFinished;
                         cnt++;
-                        Tizen.Log.Debug("NUI", "AnimationFinished added!");
+                        Tizen.Log.Fatal("NUI", "AnimationFinished added!");
                     }
+                    pointLabel.TextColorAnimatable = Color.Blue;
+                    pixelLabel.TextColorAnimatable = Color.Blue;
+
                 }
                 else if (e.Key.KeyPressedName == "Down")
                 {
@@ -145,11 +154,26 @@ namespace HelloWorldTest
                     {
                         _animation.Finished -= AnimationFinished;
                         cnt--;
-                        Tizen.Log.Debug("NUI", "AnimationFinished removed!");
+                        Tizen.Log.Fatal("NUI", "AnimationFinished removed!");
                     }
+                    pointLabel.TextColorAnimatable = Color.Red;
+                    pixelLabel.TextColorAnimatable = Color.Red;
+
                 }
+                else if (e.Key.KeyPressedName == "Return")
+                {
+                    if (_animation)
+                    {
+                        //_animation.Stop(Dali.Constants.Animation.EndAction.Stop);
+                        //_animation.Reset();
+                    }
+                    _animation.Play();
+                    Tizen.Log.Fatal("NUI", "_animation play here!");
+
             }
         }
+        }
+
 
         public void OnWindowTouched(object sender, Window.TouchEventArgs e)
         {
@@ -167,7 +191,7 @@ namespace HelloWorldTest
         [STAThread]
         static void _Main(string[] args)
         {
-            //Tizen.Log.Debug("NUI", "Main() called!");
+            Tizen.Log.Fatal("NUI", "Main() called!");
             Example example = new Example();
             example.Run(args);
         }
index a3088e9..d505da0 100755 (executable)
@@ -107,7 +107,12 @@ namespace Tizen.NUI.BaseComponents
 =======
             internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get();
             internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get();
+<<<<<<< HEAD
 >>>>>>> parent of b621f76... Revert "[Tizen] Add properties of TextLabel/Editor"
+=======
+            internal static readonly int TEXT_COLOR_ANIMATABLE = NDalicPINVOKE.TextLabel_Property_TEXT_COLOR_ANIMATABLE_get();
+
+>>>>>>> parent of bb0612e... Revert "[Tizen] Animatable TextColor Property for TextLabel"
         }
 
         /// <summary>
@@ -138,6 +143,7 @@ namespace Tizen.NUI.BaseComponents
         public new static TextLabel DownCast(BaseHandle handle)
         {
             TextLabel ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }