[NUI] some change in VectorAnimationViewTBD (#1064)
authordongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 11 Oct 2019 02:18:27 +0000 (11:18 +0900)
committerhuiyueun <35286162+huiyueun@users.noreply.github.com>
Fri, 11 Oct 2019 02:18:27 +0000 (11:18 +0900)
src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs
src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs

index d07312c9989d251c8cbcfa7b78377d5ba8c20e6f..21dec826b02cf6377ccaf800e2c4de960ac27f98 100755 (executable)
@@ -41,10 +41,10 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public AnimatedVectorImageView(float scale = 1.0f, bool shown = true) : base()
         {
-            tlog.Fatal(tag, $"  <<< AnimatedVectorImageView() constructor GetId={GetId()} >>>");
+            tlog.Fatal(tag, $"< constructor GetId={GetId()} >");
             currentStates.url = "";
             currentStates.frame = -1;
-            currentStates.loopCount = 0;
+            currentStates.loopCount = 1;
             currentStates.loopMode = LoopingModeType.Restart;
             currentStates.stopEndAction = StopBehaviorType.CurrentFrame;
             currentStates.framePlayRangeMin = -1;
@@ -68,7 +68,7 @@ namespace Tizen.NUI.BaseComponents
                 return;
             }
 
-            tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.Dispose(type={type})!");
+            tlog.Fatal(tag, $"<[{GetId()}] type={type}");
 
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
@@ -83,7 +83,7 @@ namespace Tizen.NUI.BaseComponents
             }
 
             base.Dispose(type);
-            tlog.Fatal(tag, $"  [{GetId()}]AnimatedVectorImageView.Dispose(type={type}) >>>");
+            tlog.Fatal(tag, $"[{GetId()}]>");
         }
         #endregion Constructor, Distructor, Dispose
 
@@ -102,7 +102,7 @@ namespace Tizen.NUI.BaseComponents
                 currentStates.url = ret;
                 currentStates.changed = true;
 
-                tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.URL SET url={currentStates.url} >>>");
+                tlog.Fatal(tag, $"<[{GetId()}]SET url={currentStates.url}");
 
                 PropertyMap map = new PropertyMap();
                 map.Add(Visual.Property.Type, new PropertyValue((int)DevelVisual.Type.AnimatedVectorImage))
@@ -111,11 +111,12 @@ namespace Tizen.NUI.BaseComponents
                     .Add(ImageVisualProperty.StopBehavior, new PropertyValue((int)currentStates.stopEndAction))
                     .Add(ImageVisualProperty.LoopingMode, new PropertyValue((int)currentStates.loopMode));
                 Image = map;
+                tlog.Fatal(tag, $"<[{GetId()}]>");
             }
             get
             {
                 string ret = currentStates.url;
-                tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.URL GET");
+                tlog.Fatal(tag, $"<[{GetId()}] GET");
 
                 PropertyMap map = Image;
                 if (map != null)
@@ -125,12 +126,12 @@ namespace Tizen.NUI.BaseComponents
                     {
                         if (val.Get(out ret))
                         {
-                            tlog.Fatal(tag, $"  gotten url={ret} >>>");
+                            tlog.Fatal(tag, $"gotten url={ret} >");
                             return ret;
                         }
                     }
                 }
-                tlog.Error(tag, $"  [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get URL from dali >>>");
+                tlog.Error(tag, $"  [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get URL from dali >");
                 return ret;
             }
         }
@@ -144,21 +145,24 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
-                var ret = -1;
-                PropertyMap map = Image;
+                tlog.Fatal(tag, $"< Get!");
+                PropertyMap map = base.Image;
+                var ret = 0;
                 if (map != null)
                 {
-                    PropertyValue val = map.Find((int)DevelVisual.Type.AnimatedVectorImage);
+                    PropertyValue val = map.Find(ImageVisualProperty.PlayState);
                     if (val != null)
                     {
                         if (val.Get(out ret))
                         {
-                            return (PlayStateType)ret;
+                            currentStates.playState = (PlayStateType)ret;
+                            tlog.Fatal(tag, $"gotten play state={ret} >");
+                            return currentStates.playState;
                         }
                     }
                 }
-                tlog.Error(tag, $"  [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get PlayState from dali");
-                return (PlayStateType)ret;
+                tlog.Error(tag, $"<[ERROR][{GetId()}]Fail to get PlayState from dali currentStates.playState={currentStates.playState}>");
+                return currentStates.playState;
             }
         }
 
@@ -186,7 +190,7 @@ namespace Tizen.NUI.BaseComponents
                         }
                     }
                 }
-                tlog.Error(tag, $"  [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get TotalFrameNumber from dali");
+                tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get TotalFrameNumber from dali>");
                 return ret;
             }
         }
@@ -201,7 +205,7 @@ namespace Tizen.NUI.BaseComponents
             set
             {
                 currentStates.frame = value;
-                tlog.Fatal(tag, $"   <<< [{GetId()}]AnimatedVectorImageView.CurrentFrameNumber SET frame={currentStates.frame} >>>");
+                tlog.Fatal(tag, $"<[{GetId()}]SET frame={currentStates.frame}>");
                 DoAction(vectorImageVisualIndex, (int)actionType.jumpTo, new PropertyValue(currentStates.frame));
             }
             get
@@ -220,7 +224,7 @@ namespace Tizen.NUI.BaseComponents
                         }
                     }
                 }
-                tlog.Error(tag, $"  [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get CurrentFrameNumber from dali!! ret={ret}");
+                tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get CurrentFrameNumber from dali!! ret={ret}>");
                 return ret;
             }
         }
@@ -237,7 +241,7 @@ namespace Tizen.NUI.BaseComponents
                 currentStates.loopMode = (LoopingModeType)value;
                 currentStates.changed = true;
 
-                tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.LoopMode SET loopMode={currentStates.loopMode} >>>");
+                tlog.Fatal(tag, $"<[{GetId()}] SET loopMode={currentStates.loopMode}>");
                 PropertyMap map = new PropertyMap();
                 map.Add(ImageVisualProperty.LoopingMode, new PropertyValue((int)currentStates.loopMode));
                 DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
@@ -264,7 +268,7 @@ namespace Tizen.NUI.BaseComponents
                         }
                     }
                 }
-                tlog.Error(tag, $"  [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get loopMode from dali");
+                tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get loopMode from dali>");
                 return currentStates.loopMode;
             }
         }
@@ -280,7 +284,7 @@ namespace Tizen.NUI.BaseComponents
             {
                 currentStates.changed = true;
                 currentStates.loopCount = value;
-                tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.LoopCount SET currentStates.loopCount={currentStates.loopCount} >>>");
+                tlog.Fatal(tag, $"<[{GetId()}]SET currentStates.loopCount={currentStates.loopCount}>");
                 PropertyMap map = new PropertyMap();
                 map.Add(ImageVisualProperty.LoopCount, new PropertyValue(currentStates.loopCount));
                 DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
@@ -300,14 +304,14 @@ namespace Tizen.NUI.BaseComponents
                             //tlog.Fatal(tag, $"gotten loop count={ret}");
                             if (ret != currentStates.loopCount && ret > 0)
                             {
-                                tlog.Fatal(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) different loop count! gotten={ret}, loopCount={currentStates.loopCount}");
+                                tlog.Fatal(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) different loop count! gotten={ret}, loopCount={currentStates.loopCount}>");
                             }
                             currentStates.loopCount = ret;
                             return currentStates.loopCount;
                         }
                     }
                 }
-                tlog.Error(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get LoopCount from dali  currentStates.loopCount={currentStates.loopCount}");
+                tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get LoopCount from dali  currentStates.loopCount={currentStates.loopCount}>");
                 return currentStates.loopCount;
             }
         }
@@ -324,7 +328,7 @@ namespace Tizen.NUI.BaseComponents
                 currentStates.stopEndAction = (StopBehaviorType)value;
                 currentStates.changed = true;
 
-                tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.StopBehavior SET val={currentStates.stopEndAction} >>>");
+                tlog.Fatal(tag, $"<[{GetId()}]SET val={currentStates.stopEndAction}>");
                 PropertyMap map = new PropertyMap();
                 map.Add(ImageVisualProperty.StopBehavior, new PropertyValue((int)currentStates.stopEndAction));
                 DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
@@ -344,14 +348,14 @@ namespace Tizen.NUI.BaseComponents
                             //tlog.Fatal(tag, $"gotten StopBehavior={ret}");
                             if (ret != (int)currentStates.stopEndAction)
                             {
-                                tlog.Fatal(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) different StopBehavior! gotten={ret}, StopBehavior={currentStates.stopEndAction}");
+                                tlog.Fatal(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) different StopBehavior! gotten={ret}, StopBehavior={currentStates.stopEndAction}>");
                             }
                             currentStates.stopEndAction = (StopBehaviorType)ret;
                             return (StopBehaviorType)ret;
                         }
                     }
                 }
-                tlog.Error(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get StopBehavior from dali");
+                tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get StopBehavior from dali>");
                 return currentStates.stopEndAction;
             }
         }
@@ -368,7 +372,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetPlayRange(int startFrame, int endFrame)
         {
-            tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.SetPlayRange({startFrame}, {endFrame})");
+            tlog.Fatal(tag, $"< [{GetId()}] SetPlayRange({startFrame}, {endFrame})");
 
             currentStates.changed = true;
             currentStates.framePlayRangeMin = startFrame;
@@ -381,7 +385,7 @@ namespace Tizen.NUI.BaseComponents
             PropertyMap map = new PropertyMap();
             map.Add(ImageVisualProperty.PlayRange, new PropertyValue(array));
             DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
-            tlog.Fatal(tag, $"  [{GetId()}](AnimatedVectorImageView) currentStates=({currentStates.framePlayRangeMin}, {currentStates.framePlayRangeMax}) >>>");
+            tlog.Fatal(tag, $"  [{GetId()}] currentStates.min:({currentStates.framePlayRangeMin}, max:{currentStates.framePlayRangeMax})>");
         }
 
         /// <summary>
@@ -391,9 +395,10 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public new void Play()
         {
-            tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.Play() called >>>");
+            tlog.Fatal(tag, $"<[{GetId()}] Play()");
             debugPrint();
             base.Play();
+            tlog.Fatal(tag, $"[{GetId()}]>");
         }
 
         /// <summary>
@@ -403,9 +408,10 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public new void Pause()
         {
-            tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.Pause() called >>>");
+            tlog.Fatal(tag, $"<[{GetId()}] Pause()>");
             debugPrint();
             base.Pause();
+            tlog.Fatal(tag, $"[{GetId()}]>");
         }
 
         /// <summary>
@@ -415,9 +421,10 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public new void Stop()
         {
-            tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.Stop() called >>>");
+            tlog.Fatal(tag, $"<[{GetId()}] Stop()");
             debugPrint();
             base.Stop();
+            tlog.Fatal(tag, $"[{GetId()}]>");
         }
         #endregion Method
 
@@ -434,7 +441,7 @@ namespace Tizen.NUI.BaseComponents
             {
                 if (finishedEventHandler == null)
                 {
-                    tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.Finished eventhandler added >>>");
+                    tlog.Fatal(tag, $"<[{GetId()}] Finished eventhandler added>");
                     visualEventSignalCallback = onVisualEventSignal;
                     VisualEventSignal().Connect(visualEventSignalCallback);
                 }
@@ -442,7 +449,7 @@ namespace Tizen.NUI.BaseComponents
             }
             remove
             {
-                tlog.Fatal(tag, $"  <<< [{GetId()}]AnimatedVectorImageView.Finished eventhandler removed >>>");
+                tlog.Fatal(tag, $"<[{GetId()}] Finished eventhandler removed>");
                 finishedEventHandler -= value;
                 if (finishedEventHandler == null && visualEventSignalCallback != null)
                 {
@@ -618,6 +625,7 @@ namespace Tizen.NUI.BaseComponents
             internal bool changed;
             internal int totalFrame;
             internal float scale;
+            internal PlayStateType playState;
         };
         private states currentStates;
 
@@ -645,7 +653,7 @@ namespace Tizen.NUI.BaseComponents
 
         private void OnFinished()
         {
-            tlog.Fatal(tag, $"  <<<[{GetId()}] OnFinished() called >>>");
+            tlog.Fatal(tag, $"<[{GetId()}] OnFinished()>");
             finishedEventHandler?.Invoke(this, null);
         }
 
@@ -670,7 +678,7 @@ namespace Tizen.NUI.BaseComponents
             e.SignalId = signalId;
             visualEventSignalHandler?.Invoke(this, e);
 
-            tlog.Fatal(tag, $"  [{GetId()}] onVisualEventSignal()! visualIndex={visualIndex}, signalId={signalId}");
+            tlog.Fatal(tag, $"<[{GetId()}] onVisualEventSignal()! visualIndex={visualIndex}, signalId={signalId}>");
         }
 
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
@@ -681,9 +689,11 @@ namespace Tizen.NUI.BaseComponents
 
         private void debugPrint()
         {
-            tlog.Fatal(tag, $"  <<< [{GetId()}] get currentStates : url={currentStates.url}, loopCount={currentStates.loopCount}, framePlayRangeMin/Max({currentStates.framePlayRangeMin},{currentStates.framePlayRangeMax}) ");
-            tlog.Fatal(tag, $"  get from Property : StopBehavior={StopBehavior}, LoopMode={LoopMode}, LoopCount={LoopCount} >>>");
+            tlog.Fatal(tag, $"===================================");
+            tlog.Fatal(tag, $"<[{GetId()}] get currentStates : url={currentStates.url}, loopCount={currentStates.loopCount}, framePlayRangeMin/Max({currentStates.framePlayRangeMin},{currentStates.framePlayRangeMax}) ");
+            tlog.Fatal(tag, $"  get from Property : StopBehavior={StopBehavior}, LoopMode={LoopMode}, LoopCount={LoopCount}, PlayState={PlayState} >");
+            tlog.Fatal(tag, $"===================================");
         }
         #endregion Private
     }
-}
+}
\ No newline at end of file
index 556d3d124f6d830af0efc083ceed647facc6b241..e640af5e4a5eecf6ed49b032e8ba2a03a1585ee2 100755 (executable)
@@ -38,7 +38,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public VectorAnimationViewTBD() : base()
         {
-            tlog.Fatal(tag, $"<<< VectorAnimationView() constuctor objId={GetId()} >>>");
+            tlog.Fatal(tag, $"[VAV START[ constuctor objId={GetId()} ]VAV END]");
         }
 
         /// <summary>
@@ -49,7 +49,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public VectorAnimationViewTBD(float scale) : base(scale)
         {
-            tlog.Fatal(tag, $"<<< VectorAnimationView(scale={scale}) constuctor objId={GetId()}>>>");
+            tlog.Fatal(tag, $"[VAV START[ constuctor scale={scale}) objId={GetId()} ]VAV END]");
         }
 
         /// <summary>
@@ -64,7 +64,7 @@ namespace Tizen.NUI.BaseComponents
             {
                 return;
             }
-            tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Dispose(type={type})");
+            tlog.Fatal(tag, $"[VAV START[ [{GetId()}] type={type})");
 
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
@@ -72,7 +72,7 @@ namespace Tizen.NUI.BaseComponents
 
             base.Dispose(type);
 
-            tlog.Fatal(tag, $"[{GetId()}] VectorAnimationView.Dispose() >>>");
+            tlog.Fatal(tag, $"]VAV END]");
         }
         #endregion Constructor, Distructor, Dispose
 
@@ -87,7 +87,7 @@ namespace Tizen.NUI.BaseComponents
         {
             set
             {
-                tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.ResourceURL SET");
+                tlog.Fatal(tag, $"[VAV START[ [{GetId()}] ResourceURL SET");
 
                 if (value == mResourceURL)
                 {
@@ -97,8 +97,8 @@ namespace Tizen.NUI.BaseComponents
                 mResourceURL = (value == null) ? "" : value;
                 URL = mResourceURL;
                 mIsMinMaxSet = false;
-
-                tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.ResourceURL SET mResourceURL={mResourceURL}) >>>");
+                mTotalFrameNum = TotalFrameNumber;
+                tlog.Fatal(tag, $" [{GetId()}] mResourceURL={mResourceURL}) ]VAV END]");
             }
             get => mResourceURL;
         }
@@ -116,13 +116,12 @@ namespace Tizen.NUI.BaseComponents
         {
             set
             {
-                tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.RepeatCount SET");
+                tlog.Fatal(tag, $"[VAV START[ [{GetId()}] RepeatCount SET");
 
                 mRepeatCount = (value < -1) ? -1 : value;
-                //LoopCount = mRepeatCount;
                 LoopCount = (mRepeatCount < 0) ? mRepeatCount : mRepeatCount + 1;
 
-                tlog.Fatal(tag, $"[{GetId()}] VectorAnimationView.RepeatCount SET mRepeatCount={mRepeatCount} >>>");
+                tlog.Fatal(tag, $"[{GetId()}] mRepeatCount={mRepeatCount} ]VAV END]");
             }
             get => mRepeatCount;
         }
@@ -134,7 +133,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public int TotalFrame
         {
-            get => TotalFrameNumber;
+            get => mTotalFrameNum;
         }
 
         /// <summary>
@@ -147,31 +146,29 @@ namespace Tizen.NUI.BaseComponents
         {
             set
             {
-                tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.CurrentFrame SET");
+                tlog.Fatal(tag, $"[VAV START[ [{GetId()}] CurrentFrame SET");
 
                 if (mResourceURL == null || mResourceURL == String.Empty)
                 {
                     throw new InvalidOperationException("Resource Url not yet Set");
                 }
 
-                mFrameCount = TotalFrameNumber;
-
                 if (value < 0)
                 {
                     value = 0;
                 }
-                else if (value >= mFrameCount)
+                else if (value >= mTotalFrameNum)
                 {
-                    value = mFrameCount - 1;
+                    value = mTotalFrameNum - 1;
                 }
 
                 mCurrentFrame = value;
                 AnimationState = AnimationStates.Paused;
 
-                SetPlayRange(mCurrentFrame, mCurrentFrame);
+                SetPlayRange(0, mTotalFrameNum - 1);
                 CurrentFrameNumber = mCurrentFrame;
 
-                tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.CurrentFrame SET mCurrentFrame={mCurrentFrame}) >>>");
+                tlog.Fatal(tag, $" [{GetId()}] mCurrentFrame={mCurrentFrame}) ]VAV END]");
             }
             get => mCurrentFrame;
         }
@@ -185,7 +182,7 @@ namespace Tizen.NUI.BaseComponents
         {
             set
             {
-                tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.RepeatMode SET");
+                tlog.Fatal(tag, $"[VAV START[ [{GetId()}] RepeatMode SET");
                 mRepeatMode = value;
 
                 switch (mRepeatMode)
@@ -201,7 +198,7 @@ namespace Tizen.NUI.BaseComponents
                         break;
                 }
 
-                tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.RepeatMode SET mRepeatMode={mRepeatMode}) >>>");
+                tlog.Fatal(tag, $" [{GetId()}] mRepeatMode={mRepeatMode}) ]VAV END]");
             }
             get => mRepeatMode;
         }
@@ -229,21 +226,20 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetMinAndMaxFrame(int minFrame, int maxFrame)
         {
-            tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.SetMinAndMaxFrame({minFrame}, {maxFrame})");
+            tlog.Fatal(tag, $"[VAV START[ [{GetId()}] SetMinAndMaxFrame({minFrame}, {maxFrame})");
 
             mMinFrame = (minFrame) > 0 ? minFrame : 0;
             mMaxFrame = (maxFrame) > 0 ? maxFrame : 0;
             mIsMinMaxSet = true;
-            mFrameCount = TotalFrameNumber;
 
-            if (mMinFrame >= mFrameCount)
+            if (mMinFrame >= mTotalFrameNum)
             {
-                mMinFrame = mFrameCount - 1;
+                mMinFrame = mTotalFrameNum - 1;
             }
 
-            if (mMaxFrame >= mFrameCount)
+            if (mMaxFrame >= mTotalFrameNum)
             {
-                mMaxFrame = mFrameCount - 1;
+                mMaxFrame = mTotalFrameNum - 1;
             }
 
             if (mMinFrame > mMaxFrame)
@@ -251,11 +247,11 @@ namespace Tizen.NUI.BaseComponents
                 return;
             }
 
-            base.Stop();
+            //base.Stop();
             SetPlayRange(mMinFrame, mMaxFrame);
-            CurrentFrameNumber = mMinFrame;
+            //CurrentFrameNumber = mMinFrame;
 
-            tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.SetMinAndMaxFrame(m: {mMinFrame}, {mMaxFrame}) >>>");
+            tlog.Fatal(tag, $" [{GetId()}] mMinFrame:{mMinFrame}, mMaxFrame:{mMaxFrame}) ]VAV END]");
         }
 
         /// <summary>
@@ -265,7 +261,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public new void Play()
         {
-            tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Play()");
+            tlog.Fatal(tag, $"[VAV START[ [{GetId()}] AnimationState={AnimationState}, PlayState={PlayState}");
 
             if (mResourceURL == null || mResourceURL == String.Empty)
             {
@@ -274,15 +270,12 @@ namespace Tizen.NUI.BaseComponents
 
             if (mIsMinMaxSet)
             {
-                //if(mRepeatCount > 0 )
-                //{
-                //    StopBehavior = StopBehaviorType.FirstFrame;
-                //}
                 SetPlayRange(mMinFrame, mMaxFrame);
             }
             else
             {
-                SetPlayRange(0, TotalFrameNumber - 1);
+                SetPlayRange(0, mTotalFrameNum - 1);
+                CurrentFrame = 0;
             }
 
             //temporal fix
@@ -292,7 +285,7 @@ namespace Tizen.NUI.BaseComponents
             base.Play();
             AnimationState = AnimationStates.Playing;
 
-            tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Play(mIsMinMaxSet={mIsMinMaxSet}) >>>");
+            tlog.Fatal(tag, $" [{GetId()}] mIsMinMaxSet={mIsMinMaxSet}) ]VAV END]");
         }
 
         /// <summary>
@@ -302,7 +295,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public new void Pause()
         {
-            tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Pause() AnimationState={AnimationState}");
+            tlog.Fatal(tag, $"[VAV START[ [{GetId()}] AnimationState={AnimationState}, PlayState={PlayState}");
 
             if (mResourceURL == null || mResourceURL == String.Empty)
             {
@@ -312,7 +305,7 @@ namespace Tizen.NUI.BaseComponents
             base.Pause();
             AnimationState = AnimationStates.Paused;
 
-            tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Pause() >>>");
+            tlog.Fatal(tag, $" [{GetId()}] ]VAV END]");
         }
 
         /// <summary>
@@ -327,7 +320,7 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Stop(EndActions endAction = EndActions.Cancel)
         {
-            tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Stop({endAction})");
+            tlog.Fatal(tag, $"[VAV START[ [{GetId()}] endAction:({endAction}), PlayState={PlayState}");
 
             if (mResourceURL == null || mResourceURL == String.Empty)
             {
@@ -343,7 +336,7 @@ namespace Tizen.NUI.BaseComponents
             {
                 mEndAction = endAction;
                 switch (endAction)
-            {
+                {
                     case EndActions.Cancel:
                         StopBehavior = StopBehaviorType.CurrentFrame;
                         break;
@@ -356,21 +349,35 @@ namespace Tizen.NUI.BaseComponents
                     default:
                         tlog.Fatal(tag, $" [{GetId()}] no endAction : default set");
                         break;
+                }
             }
-            }
-            //if (endAction == EndActions.Discard)
-            //{
-            //    CurrentFrame = mMinFrame;
-            //}
-            //else if (endAction == EndActions.StopFinal)
-            //{
-            //    CurrentFrame = mMaxFrame;
-            //}
             AnimationState = AnimationStates.Stopped;
 
             base.Stop();
 
-            tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Stop(endaction={endAction}) >>>");
+            if (endAction == EndActions.StopFinal)
+            {
+                if (mIsMinMaxSet)
+                {
+                    if (CurrentFrameNumber != mMaxFrame)
+                    {
+                        tlog.Fatal(tag, $"mIsMinMaxSet:{mIsMinMaxSet}, CurrentFrameNumber:{CurrentFrameNumber}, mMaxFrame:{ mMaxFrame}");
+                        CurrentFrameNumber = mMaxFrame;
+                        tlog.Fatal(tag, $"set CurrentFrameNumber({CurrentFrameNumber}) as mMaxFrame({mMaxFrame})!!!");
+                    }
+                }
+                else
+                {
+                    if (CurrentFrameNumber != mTotalFrameNum - 1)
+                    {
+                        tlog.Fatal(tag, $"mIsMinMaxSet:{mIsMinMaxSet}, CurrentFrameNumber:{CurrentFrameNumber}, mTotalFrameNum:{ mTotalFrameNum}");
+                        CurrentFrameNumber = mTotalFrameNum - 1;
+                        tlog.Fatal(tag, $"set CurrentFrameNumber({CurrentFrameNumber}) as mTotalFrameNum({mMaxFrame}) - 1 !");
+                    }
+                }
+            }
+
+            tlog.Fatal(tag, $" [{GetId()}] ]VAV END]");
         }
         #endregion Method
 
@@ -448,7 +455,7 @@ namespace Tizen.NUI.BaseComponents
         #region Private
         private string mResourceURL = null;
         private int mRepeatCount = 0;
-        private int mFrameCount = 0;
+        private int mTotalFrameNum = 0;
         private RepeatModes mRepeatMode = RepeatModes.Restart;
         private int mMinFrame = -1, mMaxFrame = -1;
         private bool mIsMinMaxSet = false;
@@ -458,4 +465,4 @@ namespace Tizen.NUI.BaseComponents
         private string tag = "NUITEST";
         #endregion Private
     }
-}
+}
\ No newline at end of file