API enhancement + docs added
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 27 Nov 2020 10:52:26 +0000 (11:52 +0100)
committerPiotr Czaja <p.czaja@samsung.com>
Tue, 14 Sep 2021 11:01:34 +0000 (13:01 +0200)
15 files changed:
Fitness/Controls/BaseTransition.cs
Fitness/Controls/BindableRecyclerView.cs
Fitness/Controls/Connected.cs
Fitness/Controls/ConnectedAnimation.cs
Fitness/Controls/ConnectedAnimationsContext.cs
Fitness/Controls/ConnectedTransition.cs
Fitness/Controls/FadeInTransition.cs [deleted file]
Fitness/Controls/FadeTransition.cs [new file with mode: 0644]
Fitness/Controls/ITransition.cs
Fitness/Controls/Page.cs
Fitness/Controls/PageTransitionCollection.cs
Fitness/Views/ExercisePreviewView.cs
Fitness/Views/FitnessItemViewRecycleAdapter.cs
Fitness/Views/MainView.xaml.cs
Fitness/res/layout/ExercisePreviewView.xaml

index bcf65c7ed0479093634248e154735ae703c4cabf..bdebeb8511ed0162f6a8370bb732001e06ea1344 100644 (file)
@@ -9,32 +9,31 @@ namespace Fitness.Controls
     public abstract class BaseTransition : ITransition
     {
         /// <summary>
-        /// 
+        /// Event triggered when animation has started.
         /// </summary>
         public event EventHandler TransitionStarted;
 
         /// <summary>
-        /// 
+        /// Event triggered when animation has finished.
         /// </summary>
         public event EventHandler TransitionFinished;
 
-        /// <summary>
-        /// 
-        /// </summary>
-        public event EventHandler TransitionCancelled;
-
         /// <summary>
         /// Transition duration (in milliseconds)
         /// </summary>
         public int Duration { get; set; }
 
         /// <summary>
-        /// 
+        /// Start transition on target view.
         /// </summary>
         public virtual void Transit(View target)
         {
         }
 
+        public virtual void Dispose()
+        {
+        }
+
         /// <summary>
         /// Raises TransitionStarted event
         /// </summary>
@@ -50,18 +49,5 @@ namespace Fitness.Controls
         {
             TransitionFinished?.Invoke(this, null);
         }
-
-        /// <summary>
-        /// Raises TransitionCancelled event
-        /// </summary>
-        protected void RaiseTransitionCancelled()
-        {
-            TransitionCancelled?.Invoke(this, null);
-        }
-
-        public virtual void Dispose()
-        {
-        }
     }
 }
-
index 48b51c107b009269626b556570fb919c3485b695..54a8e9f911c0376dbe549b7bc8c80d2d93576e9d 100644 (file)
@@ -43,26 +43,18 @@ namespace Fitness.Controls
 
         public static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
         {
-            Logger.Debug("");
             var recycler = bindable as BindableRecyclerView;
             if (recycler != null && recycler.Adapter != null)
             {
-                Logger.Debug("");
                 var enumerable = newValue as IEnumerable;
                 var enumerator = enumerable?.GetEnumerator();
                 var list = new List<object>();
 
                 while ((enumerator != null) && enumerator.MoveNext())
                 {
-                    Logger.Debug($"Item: {enumerator.Current.GetHashCode()}");
-                    if (enumerator.Current is WorkoutViewModel)
-                    {
-                        Logger.Debug($"enumerator.Current is WorkoutViewModel)");
-                    }
                     list.Add(enumerator.Current);
                 }
 
-                Logger.Debug($"list.Count: {list.Count}");
                 recycler.Adapter.Data = list;
 
                 // Set selected item by default on first item
index 655b925fcb57c2f8d483e4be88654eae8723f0ed..c350806225a7cb14062d48fc8fa626cef2197a0b 100644 (file)
@@ -1,7 +1,5 @@
-using Tizen.NUI.Binding;
 using Tizen.NUI.BaseComponents;
-
-using Fitness.Services;
+using Tizen.NUI.Binding;
 
 namespace Fitness.Controls
 {
@@ -11,7 +9,7 @@ namespace Fitness.Controls
         /// Connected animation id, bindable property.
         /// </summary>
         public static readonly BindableProperty IdProperty =
-        BindableProperty.CreateAttached("Id", typeof(string), typeof(View), null);
+            BindableProperty.CreateAttached("Id", typeof(string), typeof(View), null);
 
         /// <summary>
         /// Set connected animation id.
index 8abf6874a87c01495f531a98fdff3db7c5c444d4..594b92f74640e2151baf2bf320e4d2327ed6a3e7 100644 (file)
@@ -2,69 +2,69 @@ using System;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 
-using Fitness.Services;
-
 namespace Fitness.Controls
 {
     public class ConnectedAnimation : Animation
     {
-        private View Source { get; set; }
-
         public ConnectedAnimation(View source)
             : base()
         {
             Source = source;
         }
 
-       public void AnimateFromSourceTo(View view, string propertyName, object to, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
-       {
-           PropertyValue sourceValue, toValue;
+        private View Source { get; set; }
 
-           int idx = Source.GetPropertyIndex(propertyName);
+        public void AnimateFromSourceTo(View view, string propertyName, object to, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
+        {
+            PropertyValue sourceValue, toValue;
 
-           switch (propertyName)
-           {
-               case "Position":
-                   sourceValue = PropertyValue.CreateFromObject(GetWorldPosition(Source) - GetWorldPosition(view));
-                   break;
-               case "PositionX":
-                   sourceValue = PropertyValue.CreateFromObject((GetWorldPosition(Source) - GetWorldPosition(view)).X);
-                   break;
-               case "PositionY":
-                   sourceValue = PropertyValue.CreateFromObject((GetWorldPosition(Source) - GetWorldPosition(view)).Y);
-                   break;
-               case "PositionZ":
-                   sourceValue = PropertyValue.CreateFromObject((GetWorldPosition(Source) - GetWorldPosition(view)).Z);
-                   break;
-               default:
-                   sourceValue = Source.GetProperty(idx);
-                   break;
-           }
-           toValue = PropertyValue.CreateFromObject(to);
+            int idx = Source.GetPropertyIndex(propertyName);
 
-           AnimatePropertyBetween(view, propertyName, sourceValue, toValue, interpolation, alphaFunction);
-       }
+            switch (propertyName)
+            {
+                case "Position":
+                    sourceValue = PropertyValue.CreateFromObject(GetWorldPosition(Source) - GetWorldPosition(view));
+                    break;
+                case "PositionX":
+                    sourceValue = PropertyValue.CreateFromObject((GetWorldPosition(Source) - GetWorldPosition(view)).X);
+                    break;
+                case "PositionY":
+                    sourceValue = PropertyValue.CreateFromObject((GetWorldPosition(Source) - GetWorldPosition(view)).Y);
+                    break;
+                case "PositionZ":
+                    sourceValue = PropertyValue.CreateFromObject((GetWorldPosition(Source) - GetWorldPosition(view)).Z);
+                    break;
+                default:
+                    sourceValue = Source.GetProperty(idx);
+                    break;
+            }
 
-       private static Position GetWorldPosition(View view)
-       {
-           Position position = new Position();
+            toValue = PropertyValue.CreateFromObject(to);
 
-           while (view != null)
-           {
-               position += view.Position;
-               view = view.GetParent() as View;
-           }
-           return position;
-       }
+            AnimatePropertyBetween(view, propertyName, sourceValue, toValue, interpolation, alphaFunction);
+        }
 
-       private void AnimatePropertyBetween(View view, string propertyName, PropertyValue from, PropertyValue to, Interpolation interpolation, AlphaFunction alphaFunction)
-       {
-           var frames = new KeyFrames();
+        private static Position GetWorldPosition(View view)
+        {
+            Position position = new Position();
 
-           frames.Add(0.0f, from);
-           frames.Add(1.0f, to);
+            while (view != null)
+            {
+                position += view.Position;
+                view = view.GetParent() as View;
+            }
 
-           AnimateBetween(view, propertyName, frames, interpolation, alphaFunction);
-       }
+            return position;
+        }
+
+        private void AnimatePropertyBetween(View view, string propertyName, PropertyValue from, PropertyValue to, Interpolation interpolation, AlphaFunction alphaFunction)
+        {
+            var frames = new KeyFrames();
+
+            frames.Add(0.0f, from);
+            frames.Add(1.0f, to);
+
+            AnimateBetween(view, propertyName, frames, interpolation, alphaFunction);
+        }
     }
 }
index 6d00480d135d5d308d395274aa4fd2a32bf10960..fb4038d7698c9dabe4298ca5bb0943caad30cadf 100644 (file)
@@ -6,19 +6,34 @@ using Tizen.NUI.BaseComponents;
 namespace Fitness.Controls
 {
     /// <summary>
-    /// 
+    /// ConnectedAnimationsContext is a class that allows
+    /// creating animations between two unrelated parts of the
+    /// Application's UI.
+    ///
+    /// The class allows to create smooth animations across multiple Pages,
+    /// keeping Page implementations loosly-coupled to other Pages.
+    ///
+    /// ConnectedAnimationsContext performs two operations:
+    /// * Registering - at first View must register themself
+    /// as a source of ConnectedAnimation using predefined "AnimationId" string.
+    /// * ConnectedAnimation creating - after registering the View,
+    /// other part of the App can create ConnectedAnimation using
+    /// the same predefined "AnimationId"
     /// </summary>
     public sealed class ConnectedAnimationsContext
     {
-        private Dictionary<string, View> ViewMap;
-
+        /// <summary>
+        /// Creates new ConnectedAnimationsContext
+        /// </summary>
         public ConnectedAnimationsContext()
         {
             ViewMap = new Dictionary<string, View>();
         }
 
+        private Dictionary<string, View> ViewMap { get; set; }
+
         /// <summary>
-        /// 
+        /// Registers object as a source of ConnectedAnimation
         /// </summary>
         public void RegisterConnectedView(string animationId, View view)
         {
@@ -26,19 +41,24 @@ namespace Fitness.Controls
             {
                 throw new InvalidOperationException($"ConnectedAnimationContext already contains View for animation id: {animationId}");
             }
+
             ViewMap[animationId] = view;
         }
 
         /// <summary>
-        /// 
+        /// Creates new ConnectedAnimation that is associated to View previously
+        /// registerd with RegisterConnectedView.
+        ///
+        /// If no View has been registered on specific key the function returns
+        /// null.
         /// </summary>
         public ConnectedAnimation GetConnectedAnimation(string animationId)
         {
             if (!ViewMap.ContainsKey(animationId))
             {
-                throw new InvalidOperationException($"ConnectedAnimationContext does not contain View for animation id: {animationId}");
+                return null;
             }
-            
+
             return new ConnectedAnimation(ViewMap[animationId]);
         }
     }
index 77ddbc63275d3102bb063ba6a2022d69704d7a57..17a45548fbfd207203ed74eefce8cb6aa85472ac 100644 (file)
@@ -2,40 +2,55 @@ using System;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 
-using Fitness.Services;
-
 namespace Fitness.Controls
 {
+    /// <summary>
+    /// ConnectedTransition is a utility class that allows easy
+    /// creation and management of ConnectedAnimations.
+    /// </summary>
     public class ConnectedTransition : BaseTransition
     {
         private ConnectedAnimation animation;
 
+        /// <summary>
+        /// AnimationId that will be used to create Transition
+        /// </summary>
         public string AnimationId { get; set; }
 
-        public View Target { get; set; }
-
-        public ConnectedTransition()
-        {
-        }
+        /// <summary>
+        /// Overrides default Transit target
+        /// </summary>
+        public View TargetOverride { get; set; }
 
         public override void Transit(View target)
         {
             animation?.Stop();
             animation?.Dispose();
 
-            // in case when Target is explicite set use Target property
-            // instead of function argument
+            // FIXME
+            // Transit should generally use target argument only,
+            // however as Transitions can currently only be attached
+            // to Page object, but not any View, I need to add the "TargetOverride"
+            // property so the Transtion can be applied on specific object that we want
+            // to animate.
+            target = TargetOverride != null ? TargetOverride : target;
 
-            var container = FindContainerForView(Target);
+            var container = FindContainerForView(target);
 
             if (container == null)
             {
                 throw new InvalidOperationException("Cannot run ConnectedTransition on Target which is not a descendant of IConnectedAnimationsContainer");
             }
 
-            animation = container.GetContext().GetConnectedAnimation(AnimationId);
-            animation.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);
+            animation = container.GetContext()?.GetConnectedAnimation(AnimationId);
+
+            if (animation == null)
+            {
+                Services.Logger.Warn($"Unable to find AnimationId: {AnimationId}, ConnectedTransition aborted");
+                return;
+            }
 
+            animation.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);
             animation.Duration = Duration;
 
             if (animation == null)
@@ -43,9 +58,9 @@ namespace Fitness.Controls
                 return;
             }
 
-            animation.AnimateFromSourceTo(Target, "Position", Target.Position);
-            animation.AnimateFromSourceTo(Target, "Size", Target.Size);
-            animation.AnimateFromSourceTo(Target, "Opacity", Target.Opacity);
+            animation.AnimateFromSourceTo(target, "Position", target.Position);
+            animation.AnimateFromSourceTo(target, "Size", target.Size);
+            animation.AnimateFromSourceTo(target, "Opacity", target.Opacity);
 
             animation.Finished += AnimationFinished;
             animation.Play();
@@ -63,6 +78,7 @@ namespace Fitness.Controls
             {
                 view = view.GetParent() as View;
             }
+
             return view as IConnectedAnimationsContainer;
         }
 
diff --git a/Fitness/Controls/FadeInTransition.cs b/Fitness/Controls/FadeInTransition.cs
deleted file mode 100644 (file)
index e0e7057..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace Fitness.Controls
-{
-    public class FadeInTransition : BaseTransition
-    {
-        private Animation animation;
-
-        public override void Transit(View target)
-        {
-            animation?.Dispose();
-
-            animation = new Animation(Duration);
-            animation.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);
-
-            target.Opacity = 0.0f;
-            animation.AnimateBy(target, "Opacity", 1.0f);
-            animation.Finished += AnimationFinished;
-            animation.Play();
-            Services.Logger.Debug($"TranstionStarted");
-            RaiseTransitionStarted();
-        }
-
-        public override void Dispose()
-        {
-            animation?.Dispose();
-        }
-
-        private void AnimationFinished(object o, EventArgs args)
-        {
-            Services.Logger.Debug($"AnimationFinished");
-            RaiseTransitionFinished();
-        }
-    }
-}
diff --git a/Fitness/Controls/FadeTransition.cs b/Fitness/Controls/FadeTransition.cs
new file mode 100644 (file)
index 0000000..f2d2844
--- /dev/null
@@ -0,0 +1,55 @@
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace Fitness.Controls
+{
+    /// <summary>
+    /// FaceTransition - animates opacity from StartOpacity to EndOpacity.
+    /// </summary>
+    public class FadeTransition : BaseTransition
+    {
+        private Animation animation;
+
+        public FadeTransition()
+            : base()
+        {
+            StartOpacity = 0.0f;
+            EndOpacity = 1.0f;
+        }
+
+        /// <summary>
+        /// Initial Opacity that will be set on object when Transit begins
+        /// </summary>
+        public float StartOpacity { get; set; }
+
+        /// <summary>
+        /// Initial Opacity that will be set on object when Transit ends
+        /// </summary>
+        public float EndOpacity { get; set; }
+
+        public override void Transit(View target)
+        {
+            animation?.Dispose();
+
+            animation = new Animation(Duration);
+            animation.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);
+
+            target.Opacity = StartOpacity;
+            animation.AnimateBy(target, "Opacity", EndOpacity);
+            animation.Finished += AnimationFinished;
+            animation.Play();
+            RaiseTransitionStarted();
+        }
+
+        public override void Dispose()
+        {
+            animation?.Dispose();
+        }
+
+        private void AnimationFinished(object o, EventArgs args)
+        {
+            RaiseTransitionFinished();
+        }
+    }
+}
index b91ac5b6e37f74b7b7711040fe1f633db5794ffb..1e95cdb5a794bc2a8d411365736714dd9cffc1df 100644 (file)
@@ -5,12 +5,13 @@ namespace Fitness.Controls
 {
     public interface ITransition : IDisposable
     {
-        void Transit(View target);
-
         event EventHandler TransitionStarted;
 
         event EventHandler TransitionFinished;
 
-        event EventHandler TransitionCancelled;
+        /// <summary>
+        /// Run transtion (animation) on target View
+        /// </summary>
+        void Transit(View target);
     }
 }
index fc37cb90702806b5f8da949b32d2cb9e1adc816e..154932d75e2f4154859f24c0930eb5d6574d2e47 100644 (file)
@@ -4,8 +4,6 @@ using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
 
-using Fitness.Services;
-
 namespace Fitness.Controls
 {
     /// <summary>
@@ -13,7 +11,7 @@ namespace Fitness.Controls
     /// </summary>
     public class Page : Control, IConnectedAnimationsContainer
     {
-        private View _content = null;
+        private View content = null;
 
         public Page()
             : base()
@@ -22,37 +20,49 @@ namespace Fitness.Controls
             HeightResizePolicy = ResizePolicyType.FillToParent;
         }
 
+        public PageTransitionCollection PageTransitions { get; set; }
+
         public View Content
         {
             get
             {
-                return _content;
+                return content;
             }
+
             set
             {
-                if (_content != value)
+                if (content != value)
                 {
-                    if (_content)
+                    if (content)
                     {
-                        Remove(_content);
+                        Remove(content);
                     }
-                    _content = value;
-                    if (_content != null)
+
+                    content = value;
+                    if (content != null)
                     {
-                        _content.WidthResizePolicy = ResizePolicyType.FillToParent;
-                        _content.HeightResizePolicy = ResizePolicyType.FillToParent;
-                        Add(_content);
+                        content.WidthResizePolicy = ResizePolicyType.FillToParent;
+                        content.HeightResizePolicy = ResizePolicyType.FillToParent;
+                        Add(content);
                     }
                 }
             }
         }
 
+        internal Page ConnectedPage { get; set; }
+
         public ConnectedAnimationsContext GetContext()
         {
             return ConnectedPage?.BuildConnectedAnimationContext();
         }
 
-        internal Page ConnectedPage;
+        public virtual void OnTransitionStarted()
+        {
+        }
+
+        public virtual void OnTransitionEnded()
+        {
+        }
 
         internal ConnectedAnimationsContext BuildConnectedAnimationContext()
         {
@@ -72,16 +82,16 @@ namespace Fitness.Controls
                 children.AddRange(child.Children);
                 children.Remove(child);
             }
+
             return context;
         }
 
-        public PageTransitionCollection PageTransitions { get; set; }
-
         internal void RunTransitions()
         {
             if (PageTransitions != null)
             {
                 PageTransitions.TransitionFinished += TransitionsFinished;
+                PageTransitions.TransitionStarted += TransitionsStarted;
                 PageTransitions.Transit(this);
             }
         }
@@ -92,12 +102,10 @@ namespace Fitness.Controls
             OnTransitionEnded();
         }
 
-        public virtual void OnTransitionStarted()
-        {
-        }
-
-        public virtual void OnTransitionEnded()
+        private void TransitionsStarted(object o, EventArgs args)
         {
+            PageTransitions.TransitionStarted -= TransitionsStarted;
+            OnTransitionStarted();
         }
     }
 }
index d75cdf50056cc83a50f936337f108fa7c70a1528..9931736e4de2d7a0071d35ec33c73e768fad0ac9 100644 (file)
@@ -8,32 +8,54 @@ namespace Fitness.Controls
     {
         private int runningTransitionsCounter;
 
+        /// <summary>
+        /// Triggered when first TransitionStarted event is raised.
+        /// </summary>
         public event EventHandler TransitionStarted;
 
+        /// <summary>
+        /// Triggered when last TransitionFinished event is raised.
+        /// </summary>
         public event EventHandler TransitionFinished;
 
-        public event EventHandler TransitionCancelled;
-
+        /// <summary>
+        /// Start all Transitions in the collection.
+        /// </summary>
         public void Transit(View target)
         {
             runningTransitionsCounter = Count;
 
             foreach (var transition in this)
             {
-                transition.TransitionCancelled += CheckFinishCondition;
                 transition.TransitionFinished += CheckFinishCondition;
+                transition.TransitionStarted += CheckStartedCondition;
                 transition.Transit(target);
             }
+        }
+
+        public void Dispose()
+        {
+            foreach (var transition in this)
+            {
+                transition.Dispose();
+            }
+        }
+
+        private void CheckStartedCondition(object o, EventArgs args)
+        {
+            foreach (var transition in this)
+            {
+                transition.TransitionStarted -= CheckStartedCondition;
+            }
 
             TransitionStarted?.Invoke(this, null);
         }
 
-        public void CheckFinishCondition(object o, EventArgs args)
+        private void CheckFinishCondition(object o, EventArgs args)
         {
             if (o is ITransition t)
             {
                 t.TransitionFinished -= CheckFinishCondition;
-                t.TransitionCancelled -= CheckFinishCondition;
 
                 runningTransitionsCounter--;
 
@@ -43,13 +65,5 @@ namespace Fitness.Controls
                 }
             }
         }
-
-        public void Dispose()
-        {
-            foreach (var transition in this)
-            {
-                transition.Dispose();
-            }
-        }
     }
 }
index f422bea2a3e50220094a58b708e041ef44664f9b..81acc7439eff2dadc989e2854ca4d5785a579df6 100644 (file)
@@ -9,8 +9,6 @@ namespace Fitness.Views
 {
     public partial class ExercisePreviewView : Fitness.Controls.Page
     {
-        static private bool done = false;
-
         public ExercisePreviewView()
         {
             InitializeComponent();
@@ -19,7 +17,6 @@ namespace Fitness.Views
 
         public override void OnTransitionEnded()
         {
-            Services.Logger.Debug("OnTransitionEnded");
             CreateVideoUrlBinding();
 
             this.player.Show();
@@ -34,23 +31,19 @@ namespace Fitness.Views
             this.nextButton.Clicked += ReplyVideo;
             this.previousButton.Clicked += ReplyVideo;
             this.player.Hide();
-            this.temp.Relayout += (obj, args) =>
-            {
-                if (done)
-                    return;
-
-                done = true;
+            this.temp.Relayout += RunPageTransitions;
+        }
 
-                // this should'nt be here however currently not better place to
-                // put it.
-                this.RunTransitions();
-            };
+        private void RunPageTransitions(object o, EventArgs args)
+        {
+            this.temp.Relayout -= RunPageTransitions;
+            RunTransitions();
         }
 
         private void CreateVideoUrlBinding()
         {
-            Logger.Debug("Create BindingContext for VideoView");
             var binding = new Binding("CurrentWorkout");
+
             binding.Source = this.context;
             this.player.SetBinding(BindableObject.BindingContextProperty, binding);
 
index 9bf84882f34b5960feb14d2c4b7ad29eb12e17a5..aad7defac164d61c0f47074f77a67412859d2065 100644 (file)
@@ -12,7 +12,6 @@ namespace Fitness.Views
 
         public override RecycleItem CreateRecycleItem()
         {
-            Fitness.Services.Logger.Debug("CreateRecycleItem");
             var it = new FitnessItemView();
             it.BackgroundColor = Color.Red;
             return it;
@@ -20,11 +19,9 @@ namespace Fitness.Views
 
         public override void BindData(RecycleItem item)
         {
-            Fitness.Services.Logger.Debug("BindData");
             item.BindingContext = Data[item.DataIndex];
             if (item is FitnessItemView fitnessItem)
             {
-                Fitness.Services.Logger.Debug("item is FitnessItemView fitnessItem");
                 fitnessItem.image.BindingContext = item.BindingContext;
                 fitnessItem.label.BindingContext = item.BindingContext;
                 fitnessItem.favourite.BindingContext = item.BindingContext;
index a2581e24645ba1aed9bcebfd14ac56fdbef532f5..b10ed9894b467f4f2363990010653ae446a952a4 100644 (file)
@@ -3,8 +3,6 @@ using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
 
-using Fitness.Services;
-
 namespace Fitness.Views
 {
     public partial class MainView : Fitness.Controls.Page
@@ -16,8 +14,6 @@ namespace Fitness.Views
             this.button1.ApplyStyle(Styles.Buttons.Inverse);
             this.button2.ApplyStyle(Styles.Buttons.Regular);
             this.scroller.ScrollingDirection = ScrollableBase.Direction.Horizontal;
-
-            Logger.Debug("MainView constructor end");
         }
     }
 }
index e262267dc8408e38c1932f39c681bc62774dcdb8..4788244244e6d088b1231bf62516fb98ab4e78f2 100644 (file)
@@ -14,8 +14,8 @@
     </ctrl:Page.BindingContext>
     <ctrl:Page.PageTransitions>
         <ctrl:PageTransitionCollection>
-            <ctrl:ConnectedTransition AnimationId="preview" Target="{x:Reference temp}" Duration="500"/>
-            <ctrl:FadeInTransition Duration="500" />
+            <ctrl:ConnectedTransition AnimationId="preview" TargetOverride="{x:Reference temp}" Duration="500"/>
+            <ctrl:FadeTransition Duration="500" StartOpacity="0.0" EndOpacity="1.0" />
         </ctrl:PageTransitionCollection>
     </ctrl:Page.PageTransitions>
     <ctrl:Page.Content>