Fix Home In Animation Issue
authorHeonjae Jang <heonjae.jang@samsung.com>
Thu, 11 May 2017 11:42:45 +0000 (20:42 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:56 +0000 (18:34 +0900)
Change-Id: I7ff81af061423ae76e4109b995be3af27e707f9f
Signed-off-by: Heonjae Jang <heonjae.jang@samsung.com>
18 files changed:
LibTVRefCommonPortable/Utils/SizeUtils.cs
TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_164.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_196.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_136.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_168.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_42.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_launcher_mediahub_138.png
TVHome/TVHome.TizenTV/res/ic_launcher_mediahub_182.png
TVHome/TVHome.TizenTV/res/ic_tizen_home_list_mediahub_focused.png
TVHome/TVHome.TizenTV/res/ic_tizen_home_list_mediahub_normal.png
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs
TVHome/TVHome/ViewModels/MainPageViewModel.cs
TVHome/TVHome/Views/MainPage.xaml.cs
TVHome/TVHome/Views/MainPanel.xaml.cs
TVHome/TVHome/Views/Panel.cs
TVHome/TVHome/Views/SubPanel.xaml.cs
TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs

index b8ca066..6eebc03 100644 (file)
@@ -136,6 +136,11 @@ namespace LibTVRefCommonPortable.Utils
             return Convert.ToInt32((double)((double)widthBaseSize / (double)BaseScreenWidth) * (double)(ScreenWidth));
         }
 
+        public static double GetWidthSizeDouble(double widthBaseSize)
+        {
+            return (double)(widthBaseSize / (double)BaseScreenWidth) * (double)(ScreenWidth);
+        }
+
         /// <summary>
         /// A method provides a converted font size.
         /// </summary>
diff --git a/TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_164.png b/TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_164.png
new file mode 100644 (file)
index 0000000..041c15f
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_164.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_196.png b/TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_196.png
new file mode 100644 (file)
index 0000000..f28db0f
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_apps_launcher_mediahub_196.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_136.png b/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_136.png
new file mode 100644 (file)
index 0000000..2025049
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_136.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_168.png b/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_168.png
new file mode 100644 (file)
index 0000000..18ce5f0
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_168.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_42.png b/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_42.png
new file mode 100644 (file)
index 0000000..52d9da5
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_launcher_mediahub_42.png differ
index bdfacb1..f28db0f 100755 (executable)
Binary files a/TVHome/TVHome.TizenTV/res/ic_launcher_mediahub_138.png and b/TVHome/TVHome.TizenTV/res/ic_launcher_mediahub_138.png differ
index dc9203e..f28db0f 100755 (executable)
Binary files a/TVHome/TVHome.TizenTV/res/ic_launcher_mediahub_182.png and b/TVHome/TVHome.TizenTV/res/ic_launcher_mediahub_182.png differ
index 6277008..f28db0f 100755 (executable)
Binary files a/TVHome/TVHome.TizenTV/res/ic_tizen_home_list_mediahub_focused.png and b/TVHome/TVHome.TizenTV/res/ic_tizen_home_list_mediahub_focused.png differ
index b58cfa3..f28db0f 100755 (executable)
Binary files a/TVHome/TVHome.TizenTV/res/ic_tizen_home_list_mediahub_normal.png and b/TVHome/TVHome.TizenTV/res/ic_tizen_home_list_mediahub_normal.png differ
index a31697f..e9c2e88 100755 (executable)
@@ -4,11 +4,6 @@
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelThumbnailButton">
   <RelativeLayout x:Name="ButtonBox">
-    <Image x:Name="ThumnailDimLayer"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-            Opacity="0.99"
-            Source="img_tizen_home_list_dim_recent.png"/>
     <Image x:Name="ThumbnailImage"
             RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
             RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
             FontFamily="BreezeSans"
             Text="{Binding CurrentStateDescription.Label}"
             TextColor="#FFFFFF"/>
+      <Image x:Name="ThumnailDimLayer"
+            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
+            Aspect="Fill"
+            Opacity="0.99"
+            Source="img_tizen_home_list_dimmed_recent.png"/>
     <Button x:Name="ButtonFocusArea"
             RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
             RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
index f8f0b53..8b2689d 100755 (executable)
@@ -125,7 +125,6 @@ namespace TVHome.Controls
             ThumbnailGradient.Source = "ic_list_thumbnail_gradient_focused.9.png";
             ThumbnailTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
             //ThumbnailTitle.FadeTo(0.8, 300);
-            ThumnailDimLayer.FadeTo(0.0, 300);
 #pragma warning restore CS4014
             await View.ScaleTo(1.2, 300);
         }
@@ -142,7 +141,6 @@ namespace TVHome.Controls
             //ThumbnailTitle.FadeTo(0.3, 300);
             ThumbnailGradient.Source = "ic_list_thumbnail_gradient_normal.9.png";
             ThumbnailTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
-            ThumnailDimLayer.FadeTo(0.99, 300);
 #pragma warning restore CS4014
             await View.ScaleTo(1.0, 300);
         }
index 25c10a9..3228473 100755 (executable)
@@ -146,12 +146,12 @@ namespace TVHome.ViewModels
             }
         }
 
-        public int SubThumbPanelSpacing
+        public double SubThumbPanelSpacing
         {
             get
             {
                 // TODO : set proper size
-                return SizeUtils.GetWidthSize(27);
+                return SizeUtils.GetWidthSizeDouble(27.5);
             }
         }
 
index 8a4be03..8541d7f 100755 (executable)
@@ -67,6 +67,7 @@ namespace TVHome.Views
         /// </summary>
         private async void Iconified()
         {
+            SubPanelDictionary[SelectedMenuName]?.ForceHidePanel();
 #pragma warning disable CS4014
             SubPanelDictionary[SelectedMenuName]?.TranslateTo(0.0, SizeUtils.GetHeightSize(100), 150);
             SubPanelDictionary[SelectedMenuName]?.FadeTo(0,150);
index 79b4687..fc53ed6 100755 (executable)
@@ -21,6 +21,7 @@ using TVHome.ViewModels;
 using Xamarin.Forms;
 using System.Threading.Tasks;
 using LibTVRefCommonPortable.Utils;
+using System;
 
 namespace TVHome.Views
 {
@@ -143,5 +144,10 @@ namespace TVHome.Views
         {
 
         }
+
+        public override void ForceHidePanel()
+        {
+            throw new NotImplementedException();
+        }
     }
 }
\ No newline at end of file
index fe8cfbe..93d5274 100755 (executable)
@@ -148,6 +148,7 @@ namespace TVHome.Views
         /// A method for handling to hide panel
         /// </summary>
         public abstract void HidePanel();
+        public abstract void ForceHidePanel();
 
         /// <summary>
         /// A method for handling to show panel
index 0965667..d3ae466 100755 (executable)
@@ -275,7 +275,7 @@ namespace TVHome.Views
             {
                 item.IsEnabled = true;
                 item.FindByName<Image>("ButtonDimmedImage").Opacity = 0.99;
-                item.FindByName<Image>("ButtonDimmedImage").ScaleTo(1.0, 300);
+                //item.FindByName<Image>("ButtonDimmedImage").ScaleTo(1.0, 300);
             }
 
             this.TranslateTo(0, 0, 300);
@@ -452,5 +452,15 @@ namespace TVHome.Views
             ButtonViewList[index] = prevItemView;
             ButtonViewList[prevIndex] = originItemView;
         }
+
+        public override void ForceHidePanel()
+        {
+            foreach (var item in PanelButtonStack.Children)
+            {
+                item.FindByName<Image>("ButtonDimmedImage").Opacity = 0.99;
+            }
+            TranslationY = selectTransitionHeight;
+            Opacity = 1;
+        }
     }
 }
\ No newline at end of file
index 31da965..7a06aea 100755 (executable)
@@ -26,6 +26,7 @@ using Xamarin.Forms.PlatformConfiguration.TizenSpecific;
 
 namespace TVHome.Views
 {
+    using System;
     using System.Threading;
     using Tizen = Xamarin.Forms.PlatformConfiguration.Tizen;
     /// <summary>
@@ -216,6 +217,7 @@ namespace TVHome.Views
                 foreach (var item in PanelButtonStack.Children)
                 {
                     item.IsEnabled = true;
+                    item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 1;
                 }
 #pragma warning disable CS4014
                 this.TranslateTo(0, 0, 300);
@@ -235,7 +237,10 @@ namespace TVHome.Views
             }
 
             OnFocusedCommand.Execute("");
-
+            foreach (var item in PanelButtonStack.Children)
+            {
+                item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 0;
+            }
             isFocused = true;
             var button = PanelButtonStack.Children[0];
             button.FindByName<Button>("ButtonFocusArea").Focus();
@@ -245,5 +250,16 @@ namespace TVHome.Views
             this.TranslateTo(0, -selectTransitionHeight, 300);
 #pragma warning restore CS4014
         }
+
+        public override void ForceHidePanel()
+        {
+            foreach (var item in PanelButtonStack.Children)
+            {
+                item.IsEnabled = true;
+                item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 1;
+            }
+            this.TranslationY = selectTransitionHeight;
+            Opacity = 1;
+        }
     }
 }
\ No newline at end of file