Add SizeUtils to provide translated with ration of current screen.
authorcskim <charles0.kim@samsung.com>
Mon, 10 Apr 2017 09:37:34 +0000 (18:37 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:52 +0000 (18:34 +0900)
Change-Id: I0214714aee4a06c9e5033d8c84be2b277a321196

50 files changed:
LibTVRefCommonPortable/LibTVRefCommonPortable.csproj
LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs
LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs
LibTVRefCommonPortable/Utils/SizeUtils.cs [new file with mode: 0644]
LibTVRefCommonTizen/Ports/ApplicationManagerPort.cs
TVApps/TVApps.TizenTV/TVApps.TizenTV.cs
TVApps/TVApps/Controls/AppItemCell.xaml
TVApps/TVApps/Controls/AppItemCell.xaml.cs
TVApps/TVApps/Controls/AppListView.xaml
TVApps/TVApps/Controls/AppListView.xaml.cs
TVApps/TVApps/Controls/TVButton.xaml
TVApps/TVApps/Controls/TVButton.xaml.cs
TVApps/TVApps/TVApps.cs
TVApps/TVApps/ViewModels/MainPageViewModel.cs
TVApps/TVApps/Views/FooterNormalStatus.xaml
TVApps/TVApps/Views/FooterPinStatus.xaml
TVApps/TVApps/Views/MainPage.xaml
TVApps/TVApps/Views/MainPage.xaml.cs
TVHome/TVHome.TizenTV/TVHome.TizenTV.cs
TVHome/TVHome.TizenTV/res/ic_home_settings_all_138.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_all_182.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_138.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_182.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_color_138.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_color_182.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_138.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_182.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_tint_138.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/ic_home_settings_tint_182.png [new file with mode: 0644]
TVHome/TVHome/Controls/MainPanelButton.xaml
TVHome/TVHome/Controls/MainPanelButton.xaml.cs
TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml
TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs
TVHome/TVHome/Controls/SubPanelButton.xaml
TVHome/TVHome/Controls/SubPanelButton.xaml.cs
TVHome/TVHome/Controls/SubPanelReservedButton.xaml
TVHome/TVHome/Controls/SubPanelReservedButton.xaml.cs
TVHome/TVHome/Controls/SubPanelSettingButton.xaml
TVHome/TVHome/Controls/SubPanelSettingButton.xaml.cs
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs
TVHome/TVHome/TVHome.cs
TVHome/TVHome/ViewModels/MainPageViewModel.cs
TVHome/TVHome/Views/MainPage.xaml.cs
TVHome/TVHome/Views/MainPanel.xaml
TVHome/TVHome/Views/MainPanel.xaml.cs
TVHome/TVHome/Views/SubPanel.xaml
TVHome/TVHome/Views/SubPanel.xaml.cs
TVHome/TVHome/Views/SubThumbnailPanel.xaml
TVHome/TVHome/Views/SubThumbnailPanel.xaml.cs

index f682b4a481efbb1c6908219c1e8bb435f59a8a84..c8af293a871c9ca70fff88d9513ccbf0579ee66e 100755 (executable)
@@ -53,6 +53,7 @@
     <Compile Include="Utils\AppControlUtils.cs" />
     <Compile Include="Utils\ApplicationManagerUtils.cs" />
     <Compile Include="Utils\AppShortcutStorage.cs" />
+    <Compile Include="Utils\SizeUtils.cs" />
     <Compile Include="Utils\DateUtils.cs" />
     <Compile Include="Utils\DebuggingUtils.cs" />
     <Compile Include="Utils\IAppControl.cs" />
index 28b8a25f6eda9b815a5410201bd88075137da655..97bb8a1c00e45b36395a06dc57255b1fc4b8654b 100755 (executable)
@@ -93,6 +93,7 @@ namespace LibTVRefCommonPortable.Utils
         /// <summary>
         /// A method for removing the specified recent application
         /// </summary>
+        /// <param name="appId">A application ID</param>
         void DeleteRecentApplication(string appId);
 
         /// <summary>
index 6920fa356f36a82b6c7ac810c8d3460103edc8b1..769185017c39731f11df0d1194e8329e1a0691a3 100755 (executable)
@@ -70,7 +70,7 @@ namespace LibTVRefCommonPortable.Utils
         /// <summary>
         /// A method deletes a Recent Shortcut.
         /// </summary>
-        /// <param name="shortcut">A recent Shortcut</param>
+        /// <param name="appId">A application ID</param>
         public static void Delete(string appId)
         {
             IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();
diff --git a/LibTVRefCommonPortable/Utils/SizeUtils.cs b/LibTVRefCommonPortable/Utils/SizeUtils.cs
new file mode 100644 (file)
index 0000000..4084331
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace LibTVRefCommonPortable.Utils
+{
+    /// <summary>
+    /// A class provides Size metric related functions
+    /// </summary>
+    public class SizeUtils
+    {
+        /// <summary>
+        /// Base Screen Height
+        /// </summary>
+        private static int baseScreenWidth = 1920;
+
+        /// <summary>
+        /// Base Screen Height
+        /// </summary>
+        public static int BaseScreenWidth
+        {
+            get
+            {
+                return baseScreenWidth;
+            }
+        }
+
+        /// <summary>
+        /// Base Screen Height
+        /// </summary>
+        private static int baseScreenHeight = 1080;
+
+        /// <summary>
+        /// Base Screen Height
+        /// </summary>
+        public static int BaseScreenHeight
+        {
+            get
+            {
+                return baseScreenHeight;
+            }
+        }
+
+
+        /// <summary>
+        /// Screen Height
+        /// </summary>
+        public static int ScreenHeight { set; get; }
+
+        /// <summary>
+        /// Screen Width
+        /// </summary>
+        public static int ScreenWidth { set; get; }
+
+        /// <summary>
+        /// Font Scale ratio
+        /// </summary>
+        public static double ScaleRatio { set; get; }
+
+        /// <summary>
+        /// A method provides a converted height size.
+        /// </summary>
+        /// <param name="heightBaseSize">A height value in BaseScreen ratio</param>
+        /// <returns>A date</returns>
+        public static int GetHeightSize(int heightBaseSize)
+        {
+            return Convert.ToInt32((double)((double)heightBaseSize / (double)BaseScreenHeight) * (double)(ScreenHeight));
+        }
+
+        /// <summary>
+        /// A method provides a converted width size.
+        /// </summary>
+        /// <param name="widthBaseSize">A width value in BaseScreen ratio</param>
+        /// <returns>A date</returns>
+        public static int GetWidthSize(int widthBaseSize)
+        {
+            return Convert.ToInt32((double)((double)widthBaseSize / (double)BaseScreenWidth) * (double)(ScreenWidth));
+        }
+
+        /// <summary>
+        /// A method provides a converted font size.
+        /// </summary>
+        /// <param name="fontBaseSize">A base font size value in BaseScreen ratio</param>
+        /// <returns>A date</returns>
+        public static int GetFontSize(int fontBaseSize)
+        {
+            return Convert.ToInt32(((double)((double)fontBaseSize / (double)BaseScreenHeight) * (double)(ScreenHeight)) * ScaleRatio);
+        }
+    }
+}
index 827f5665757bcc3e890701d6155a9510ee69e714..1b79e72db17b9365c79ae7e52603c62846faaba7 100755 (executable)
@@ -222,7 +222,7 @@ namespace LibTVRefCommonTizen.Ports
                 appInfo = ApplicationManager.GetInstalledApplication(appID);
                 if (appInfo == null)
                 {
-                    DbgPort.D("Failed to get the installed application(" + appID +")");
+                    DbgPort.D("Failed to get the installed application(" + appID + ")");
                     return false;
                 }
 
@@ -244,7 +244,7 @@ namespace LibTVRefCommonTizen.Ports
         {
             IEnumerable<ApplicationInfo> installedList = await ApplicationManager.GetInstalledApplicationsAsync();
 
-            foreach(var app in installedList)
+            foreach (var app in installedList)
             {
                 if (app.Label.Equals(appLabel))
                 {
index 44300b73ba5d48fe991ae161a1a7a16a4e197fc5..1afc93107c78b5408bb43c2fc365cb97fa41d76f 100755 (executable)
@@ -60,7 +60,7 @@ namespace TVApps.TizenTV
         protected override void OnCreate()
         {
             base.OnCreate();
-            var app = new App();
+            var app = new App(MainWindow.ScreenSize.Width, MainWindow.ScreenSize.Height, ElmSharp.Elementary.GetScale());
             notification = app;
 
             AppResourcePath = DirectoryInfo.Resource;
index f53cb3bb36529810360b2cddf6c30fb29b363768..c0008489425357545af930692f76fe73ac3dc4a0 100755 (executable)
@@ -4,8 +4,7 @@
           xmlns:Control="clr-namespace:TVApps.Controls"
           x:Class="TVApps.Controls.AppItemCell">
 
-    <RelativeLayout HeightRequest="342"
-                    WidthRequest="240">
+    <RelativeLayout x:Name="IconLayout">
         <Image x:Name="ButtonImage"
                RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4795}"
                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.6833}"
@@ -55,7 +54,6 @@
                    Grid.RowSpan="3"
                    Grid.Column="2"
                    Opacity="1"
-                   FontSize="56"
                    TextColor="White"
                    LineBreakMode="TailTruncation"
                    HorizontalTextAlignment="Center"
index 089a88bb52b28b1973f0846c4deebdbf861b070b..85fa16ec8cd2d5c65f2e242da60b79b0fec7d4d8 100755 (executable)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+using LibTVRefCommonPortable.Utils;
 using System;
 using System.ComponentModel;
 using System.Windows.Input;
@@ -115,6 +116,26 @@ namespace TVApps.Controls
             set { SetValue(IsFocusedProperty, value); }
         }
 
+        /// <summary>
+        /// 2 px height size
+        /// </summary>
+        private int height2 = SizeUtils.GetHeightSize(2);
+
+        /// <summary>
+        /// 28 px height size
+        /// </summary>
+        private int height28 = SizeUtils.GetHeightSize(28);
+
+        /// <summary>
+        /// 90 px height size
+        /// </summary>
+        private int height90 = SizeUtils.GetHeightSize(90);
+
+        /// <summary>
+        /// 144 px height size
+        /// </summary>
+        private int height144 = SizeUtils.GetHeightSize(144);
+
         /// <summary>
         /// A constructor
         /// Adds PropertyChanged event handler
@@ -122,9 +143,16 @@ namespace TVApps.Controls
         public AppItemCell()
         {
             InitializeComponent();
+
+            // TODO : set proper size
+            IconLayout.WidthRequest = SizeUtils.GetWidthSize(240);
+            // TODO : set proper size
+            IconLayout.HeightRequest = SizeUtils.GetHeightSize(342);
+            ButtonTitle.FontSize = SizeUtils.GetFontSize(28);
+
+            ButtonTitle.PropertyChanged += ButtonTitlePropertyChanged;
             OptionMenuPinToggleButton.Text = IsPinned ? "UNPIN" : "PIN";
             PropertyChanged += AppItemCellPropertyChanged;
-            ButtonTitle.PropertyChanged += ButtonTitlePropertyChanged;
         }
 
         /// <summary>
@@ -159,10 +187,10 @@ namespace TVApps.Controls
                     finished: (a, b) =>
                     {
                         ButtonImage.ScaleTo(1.32, 150);
-                        TextArea.TranslateTo(0.0, 28.0, 150);
+                        TextArea.TranslateTo(0.0, height28, 150);
                         CheckImage.FadeTo((IsChecked) ? 0.99 : 0.0, 150);
                         DimImage.FadeTo((IsChecked) ? 0.99 : 0.0, 150);
-                        DimImage.TranslateTo(0.0, (IsChecked) ? 2.0 : 0.0, 150);
+                        DimImage.TranslateTo(0.0, (IsChecked) ? height2 : 0.0, 150);
                         DimImage.ScaleTo((IsChecked) ? 1.32 : 0.0, 300);
                     });
                 }
@@ -170,7 +198,7 @@ namespace TVApps.Controls
                 {
                     CheckImage.FadeTo((IsChecked) ? 0.99 : 0.0, 300);
                     DimImage.FadeTo((IsChecked) ? 0.99 : 0.0, 300);
-                    DimImage.TranslateTo(0.0, (IsChecked) ? 2.0 : 0.0, 300);
+                    DimImage.TranslateTo(0.0, (IsChecked) ? height2 : 0.0, 300);
                     DimImage.ScaleTo((IsChecked) ? 1.32 : 0.0, 300);
                 }
 
@@ -194,8 +222,8 @@ namespace TVApps.Controls
         public void ChangeIconSize(IconSize size)
         {
             ButtonImage.ScaleTo((size == IconSize.Normal) ? 1.0 : 1.32, 50);
-            ButtonImage.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : 2, 100);
-            TextArea.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : 28, 50);
+            ButtonImage.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : height2, 100);
+            TextArea.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : height28, 50);
         }
 
         /// <summary>
@@ -204,10 +232,10 @@ namespace TVApps.Controls
         /// <param name="isShow">A flag indicates whether the option menu should be showed or not</param>
         public void ShowOptionMenu(bool isShow)
         {
-            ButtonImage.TranslateTo(0, (isShow) ? -90 : 0, 100);
-            TextArea.TranslateTo(0, (isShow) ? -90 : 0, 100);
+            ButtonImage.TranslateTo(0, (isShow) ? -height90 : 0, 100);
+            TextArea.TranslateTo(0, (isShow) ? -height90 : 0, 100);
             TextArea.FadeTo((isShow) ? 0.0 : 0.99, 100);
-            OptionMenuArea.TranslateTo(0, (isShow) ? -144 : 0, 100);
+            OptionMenuArea.TranslateTo(0, (isShow) ? -height144 : 0, 100);
         }
 
         /// <summary>
@@ -253,8 +281,8 @@ namespace TVApps.Controls
             if (IsChecked)
             {
                 DimImage.ScaleTo(1.32, 300);
-                DimImage.TranslateTo(0.0, 2, 300);
-                CheckImage.TranslateTo(0.0, 2, 300);
+                DimImage.TranslateTo(0.0, height2, 300);
+                CheckImage.TranslateTo(0.0, height2, 300);
             }
         }
 
index 1d827de30c477b821353894f782095dd15856b37..1cd1e8553227a813806772f4017d41f2b7be779c 100755 (executable)
                      RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
                      RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
                      Orientation="Horizontal"
-                     HorizontalOptions="Start"
-                     Padding="58, 0, 58, 0"
-                     Spacing="16"/>
+                     HorizontalOptions="Start"/>
 
         <StackLayout x:Name="AppLowerList"
                      RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.5197}"
-                     RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=AppUpperList, Property=Height, Factor=1, Constant=-64}"
+                     RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=AppUpperList, Property=Height, Factor=0.8}"
                      RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
                      Orientation="Horizontal"
-                     HorizontalOptions="Start"
-                     Padding="58, 0, 58, 0"
-                     Spacing="16"/>
+                     HorizontalOptions="Start"/>
 
     </RelativeLayout>
 </ScrollView>
index 0d2a340f3d92fa113a3413b034463aee6fc14a56..b7763d0d19fd550079a993adce7e71a11a8de259 100644 (file)
@@ -20,6 +20,7 @@ using LibTVRefCommonPortable.DataModels;
 using System.Collections.Generic;
 using System;
 using System.Threading.Tasks;
+using LibTVRefCommonPortable.Utils;
 
 namespace TVApps.Controls
 {
@@ -78,6 +79,27 @@ namespace TVApps.Controls
             }
         }
 
+        /// <summary>
+        /// The lower app list constant value
+        /// </summary>
+        private int appLowerListConstant;
+
+        /// <summary>
+        /// The lower app list constant value
+        /// </summary>
+        public int AppLowerListConstant
+        {
+            get
+            {
+                if (appLowerListConstant == 0)
+                {
+                    appLowerListConstant = SizeUtils.GetHeightSize(-64);
+                }
+
+                return appLowerListConstant;
+            }
+        }
+
         /// <summary>
         /// A constructor
         /// Adds PropertyChanged event handler
@@ -85,6 +107,18 @@ namespace TVApps.Controls
         public AppListView()
         {
             InitializeComponent();
+
+            // TODO : set proper size
+            Thickness padding = new Thickness(SizeUtils.GetHeightSize(58), 0, SizeUtils.GetHeightSize(58), 0);
+            // TODO : set proper size
+            int spacing = SizeUtils.GetWidthSize(16);
+
+            AppUpperList.Padding = padding;
+            AppUpperList.Spacing = spacing;
+
+            AppLowerList.Padding = padding;
+            AppLowerList.Spacing = spacing;
+
             AppCount = 0;
             PropertyChanged += AppListViewPropertyChanged;
         }
@@ -115,9 +149,6 @@ namespace TVApps.Controls
                 return;
             }
 
-            // For Test Code
-            //for (var test = 0; test < 4; test++)
-            //{
             foreach (var item in ItemsSource)
             {
                 var viewCell = ItemTemplate.CreateContent() as AppItemCell;
@@ -148,7 +179,6 @@ namespace TVApps.Controls
 
                 AppCount = AppCount + 1;
             }
-            //}
         }
 
         /// <summary>
index 39c3eea561f34d38ae29fd5beabbb2544b5430e4..765c448909d1a6f0593ba014b0dceb24316db3c5 100644 (file)
@@ -2,21 +2,8 @@
 <StackLayout  xmlns="http://xamarin.com/schemas/2014/forms"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               xmlns:Controls="clr-namespace:TVApps.Controls"
-              HeightRequest="80"
-              WidthRequest="300"
-              Margin="1, 0, 0, 0"
               x:Class="TVApps.Controls.TVButton">
 
-  <StackLayout.Resources>
-    <ResourceDictionary>
-      <Style x:Key="ButtonText" TargetType="Label" >
-        <Setter Property="FontSize" Value="62" />
-        <Setter Property="TextColor" Value="#F7F7F7" />
-        <Setter Property="FontFamily" Value="Breeze Sans Regular" />
-      </Style>
-    </ResourceDictionary>
-  </StackLayout.Resources>
-
   <Grid x:Name="ButtonGrid"
         BackgroundColor="#000000FF"
         VerticalOptions="FillAndExpand"
 
     <Label Grid.Row="0" Grid.Column="0"
            x:Name="TitleText"
-           Style="{StaticResource ButtonText}"
-           VerticalOptions="Center"
+           FontSize="{Binding RegularFontSize}"
            HorizontalOptions="Center"
-           TextColor="#F7F7F7"></Label>
+           VerticalOptions="Center"
+           FontFamily="Breeze Sans Regular"
+           TextColor="#F7F7F7"/>
 
     <Controls:NinePatchImage Grid.Row="0" Grid.Column="0"
                              x:Name="BackgroundImage"
index d669d9cf662485a3a4081dc2cd4649d4f03dffbc..8b00e77f10ac997049ee17cd9608916597242d9e 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+using LibTVRefCommonPortable.Utils;
 using System;
 using System.Windows.Input;
 using Xamarin.Forms;
@@ -78,6 +79,10 @@ namespace TVApps.Controls
         public TVButton()
         {
             InitializeComponent();
+
+            WidthRequest = SizeUtils.GetWidthSize(300);
+            HeightRequest = SizeUtils.GetHeightSize(80);
+
             HiddenButton.Clicked += ButtonClickListener;
             HiddenButton.Focused += ButtonFocusedListener;
             HiddenButton.Unfocused += ButtonUnfocusedListener;
index 2c8a4f667f961215d7ba5fec47e1a909c7bb0055..a94cbe91674d7ee46819fe47113cc935c48eca30 100755 (executable)
@@ -60,8 +60,15 @@ namespace TVApps
         /// Sets main page to MainPage instance
         /// </summary>
         /// <see cref="MainPage"/>
-        public App()
+        /// <param name="screenWidth">Screen Width</param>
+        /// <param name="screenHeight">Screen Height</param>
+        /// <param name="scaleRatio">Scale ratio</param>
+        public App(int screenWidth, int screenHeight, double scaleRatio)
         {
+            SizeUtils.ScreenWidth = screenWidth;
+            SizeUtils.ScreenHeight = screenHeight;
+            SizeUtils.ScaleRatio = scaleRatio;
+
             MainPage = new MainPage();
         }
 
index c032da826e7e3a5eb95eb4923c6401cba219aec0..6af495f3781d24c5694e10489c0d75779fd3239c 100644 (file)
@@ -154,6 +154,48 @@ namespace TVApps.ViewModels
             }
         }
 
+        /// <summary>
+        /// Title text font size
+        /// </summary>
+        int titleTextSize;
+
+        /// <summary>
+        /// Title text font size
+        /// </summary>
+        public int TitleTextSize
+        {
+            get
+            {
+                if (titleTextSize == 0)
+                {
+                    titleTextSize = SizeUtils.GetFontSize(84);
+                }
+
+                return titleTextSize;
+            }
+        }
+
+        /// <summary>
+        /// Regular text font size
+        /// </summary>
+        int regularFontSize;
+
+        /// <summary>
+        /// Regular text font size
+        /// </summary>
+        public int RegularFontSize
+        {
+            get
+            {
+                if (regularFontSize == 0)
+                {
+                    regularFontSize = SizeUtils.GetFontSize(28);
+                }
+
+                return regularFontSize;
+            }
+        }
+
         /// <summary>
         /// Gets and Sets current sorting option index
         /// If change SortingOption index, AppsHolder sorts list
index 0a023cf0604088f4298f4df0f693f2e5bb72d8eb..5ef0dd3c8935fce734d6d2d52807f784343dc639 100644 (file)
@@ -6,19 +6,6 @@
       PinAppCommand="{Binding ButtonPinAppCommand}"
       DeleteAppCommand="{Binding ButtonDeleteAppCommand}">
 
-  <Grid.Resources>
-    <ResourceDictionary>
-      <Style x:Key="button" TargetType="Button">
-        <Setter Property="BorderColor" Value="#FFFFFF"/>
-        <Setter Property="HeightRequest" Value="40"/>
-        <Setter Property="WidthRequest" Value="598"/>
-        <Setter Property="BorderWidth" Value="2" />
-        <Setter Property="HorizontalOptions" Value="Center"/>
-        <Setter Property="BackgroundColor" Value="Transparent"/>
-      </Style>
-    </ResourceDictionary>
-  </Grid.Resources>
-
   <Grid.RowDefinitions>
     <RowDefinition Height="625*" />
     <RowDefinition Height="375*" />
@@ -43,7 +30,7 @@
       </Picker.Items>
     </Picker>
 
-    <Control:TVButton Text="Options"
+    <Control:TVButton Text="OPTION"
             Clicked="OnOptionsClicked" />
 
   </StackLayout>
index 05c76966db4053a243767a11807080174be8fe1e..e14cdd2adfe2041db48cfc0d21d49543c63f1437 100644 (file)
   <StackLayout Grid.Row="0" Grid.Column="1"
                Orientation="Horizontal">
     <Label x:Name="FooterAdditionalText"
-           FontSize="56"
+           FontSize="{Binding RegularFontSize}"
            TextColor="White"
-           HorizontalTextAlignment="Start"
-           VerticalTextAlignment="Center"
+           FontAttributes="Bold"
            Text="{Binding SumOfCheckedApp}" />
-    <Label FontSize="56"
+    <Label FontSize="{Binding RegularFontSize}"
            TextColor="White"
-           HorizontalTextAlignment="Start"
-           VerticalTextAlignment="Center"
            Text=" Pinned" />
   </StackLayout>
 
index 73800dcd2afa2cde51f61aa643cb77c583e4bc39..19daedcd5efaa89064bce233e710d9ab481fe672 100755 (executable)
   <ContentPage.Resources>
     <ResourceDictionary>
       <Style x:Key="titleText" TargetType="Label" >
-        <Setter Property="FontSize" Value="187" />
         <Setter Property="TextColor" Value="#FFFFFF" />
         <Setter Property="FontFamily" Value="Breeze Sans Regular" />
       </Style>
       <Style x:Key="backKeyInfoText" TargetType="Label" >
-        <Setter Property="FontSize" Value="62" />
         <Setter Property="TextColor" Value="#99FFFFFF" />
         <Setter Property="FontFamily" Value="Breeze Sans Regular" />
       </Style>
-      <Style x:Key="buttonTextNormal" TargetType="Label" >
-        <Setter Property="FontSize" Value="62" />
-        <Setter Property="TextColor" Value="#F7F7F7" />
-        <Setter Property="FontFamily" Value="Breeze Sans Regular" />
-      </Style>
-      <Style x:Key="buttonTextPressed" TargetType="Label" >
-        <Setter Property="FontSize" Value="62" />
-        <Setter Property="TextColor" Value="#F7F7F708" />
-        <Setter Property="FontFamily" Value="Breeze Sans Regular" />
-      </Style>
-      <Style x:Key="pinnedText" TargetType="Label" >
-        <Setter Property="FontSize" Value="50" />
-        <Setter Property="TextColor" Value="#F7F7F7" />
-        <Setter Property="FontFamily" Value="Breeze Sans Regular" />
-      </Style>
-
-      <Style x:Key="button" TargetType="Button">
-        <Setter Property="BorderColor" Value="#FFFFFF"/>
-        <Setter Property="HeightRequest" Value="40"/>
-        <Setter Property="BorderWidth" Value="2" />
-        <Setter Property="HorizontalOptions" Value="Center"/>
-        <Setter Property="BackgroundColor" Value="Transparent"/>
-      </Style>
     </ResourceDictionary>
   </ContentPage.Resources>
 
     <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
 
     <Label Grid.Row="0"
-             Style="{StaticResource titleText}"
-             HorizontalTextAlignment="Center"
-             VerticalOptions="CenterAndExpand"
-             HorizontalOptions="CenterAndExpand"
-             Text="APPS" />
+           Style="{StaticResource titleText}"
+           HorizontalTextAlignment="Center"
+           VerticalOptions="CenterAndExpand"
+           HorizontalOptions="CenterAndExpand"
+           FontSize="{Binding TitleTextSize}"
+           Text="APPS" />
 
     <Grid Grid.Row="0">
       <Grid.RowDefinitions>
                    VerticalOptions="FillAndExpand"
                    HorizontalOptions="StartAndExpand"
                    Orientation="Horizontal">
-        <Image Source="ic_tizen_apps_additional_back.png"
-               WidthRequest="40"
-               HeightRequest="40"
+        <Image x:Name="BackKeyInfoImage"
+               Source="ic_tizen_apps_additional_back.png"
                VerticalOptions="Center"/>
         <Label x:Name="BackKeyInfo"
                Style="{StaticResource backKeyInfoText}"
-               Margin="6, 0, 0, 0"
                VerticalOptions="Center"
                HorizontalOptions="End"
                HorizontalTextAlignment="Start" />
index 972bed8b9c46d14d982889e9ac8c67027aa898a0..0c9ad1ca0fc0e166815c7e7b123dbebab511028d 100644 (file)
@@ -31,6 +31,11 @@ namespace TVApps.Views
     /// </summary>
     public partial class MainPage : ContentPage
     {
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int showTransitionHeight = SizeUtils.GetHeightSize(12);
+
         /// <summary>
         /// Identifies the CurrentStatus bindable property
         /// </summary>
@@ -99,7 +104,7 @@ namespace TVApps.Views
         /// </summary>
         private async void PlayShowAnimation()
         {
-            await AppList.TranslateTo(0, 12, 0);
+            await AppList.TranslateTo(0, showTransitionHeight, 0);
 #pragma warning disable CS4014
             AppList.TranslateTo(0, 0, 667);
 #pragma warning restore CS4014
@@ -116,6 +121,14 @@ namespace TVApps.Views
         public MainPage()
         {
             InitializeComponent();
+
+            int backKeyImageSize = SizeUtils.GetHeightSize(40);
+            BackKeyInfoImage.WidthRequest = backKeyImageSize;
+            BackKeyInfoImage.HeightRequest = backKeyImageSize;
+            BackKeyInfo.FontSize = SizeUtils.GetFontSize(28);
+            BackKeyInfo.Margin = new Thickness(SizeUtils.GetWidthSize(6), 0, 0, 0);
+
+
             PropertyChanged += MainPagePropertyChanged;
             SetCurrentStatus(AppsStatus.Default);
             PlayShowAnimation();
index 268d499e3ff2f35030aa20e470dcb037a1c11d84..af42553c3d4c137572dc0df3fb2d24ee56c6e523 100755 (executable)
@@ -59,7 +59,7 @@ namespace TVHome.TizenTV
         protected override void OnCreate()
         {
             base.OnCreate();
-            var app = new App();
+            var app = new App(MainWindow.ScreenSize.Width, MainWindow.ScreenSize.Height, ElmSharp.Elementary.GetScale());
             notification = app;
 
             AppResourcePath = DirectoryInfo.Resource;
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_all_138.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_all_138.png
new file mode 100644 (file)
index 0000000..ccc12ce
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_all_138.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_all_182.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_all_182.png
new file mode 100644 (file)
index 0000000..c9cbbcb
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_all_182.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_138.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_138.png
new file mode 100644 (file)
index 0000000..2d7b9b9
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_138.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_182.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_182.png
new file mode 100644 (file)
index 0000000..c320395
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_brightness_182.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_color_138.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_color_138.png
new file mode 100644 (file)
index 0000000..89040cc
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_color_138.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_color_182.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_color_182.png
new file mode 100644 (file)
index 0000000..8a19652
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_color_182.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_138.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_138.png
new file mode 100644 (file)
index 0000000..c88b18a
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_138.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_182.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_182.png
new file mode 100644 (file)
index 0000000..e264e88
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_contrast_182.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_tint_138.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_tint_138.png
new file mode 100644 (file)
index 0000000..7f9a87c
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_tint_138.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_home_settings_tint_182.png b/TVHome/TVHome.TizenTV/res/ic_home_settings_tint_182.png
new file mode 100644 (file)
index 0000000..c3b9169
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_home_settings_tint_182.png differ
index 92dbd821a5508cfe364dbf041f931fcb4acac14a..4f28b8130610312ff43c2c49a0dd4e8e1eb7ee21 100755 (executable)
@@ -4,8 +4,7 @@
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.MainPanelButton">
     <RelativeLayout Opacity="0.01"
-                    HeightRequest="240"
-                    WidthRequest="236"
+                    x:Name="ButtonBox"
                     HorizontalOptions="Center"
                     VerticalOptions="Center">
         <Image x:Name="ButtonBgImage"
                RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.3916}"
                Source="{Binding CurrentStateDescription.IconPath}" />
         <Label x:Name="ButtonTitle"
-               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.125}"
+               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.15}"
                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-               RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.875}"
+               RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.85}"
                Opacity="0"
-               FontSize="58"
                TextColor="White"
                LineBreakMode="TailTruncation"
                HorizontalTextAlignment="Center"
index 6b0937670268e2dd84fd1ed1d5e45ca7be2e0e3e..86c645ce34e467449c02ee74227ea55994588712 100755 (executable)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+using LibTVRefCommonPortable.Utils;
 using System;
 using Xamarin.Forms;
 
@@ -44,6 +45,11 @@ namespace TVHome.Controls
         public MainPanelButton()
         {
             InitializeComponent();
+
+            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(236);
+            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(260);
+            ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
+
             PropertyChanged += MainPanelButton_PropertyChanged;
         }
 
index cd7b176377defa77d4a8195ea811bf138a057d43..be9d49c339d541ac36cc3b3c6a55ada7d6d80a1d 100755 (executable)
@@ -4,9 +4,7 @@
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelAllAppsButton">
   <RelativeLayout x:Name="ButtonBox"
-             HeightRequest="230"
-             WidthRequest="182"
-             HorizontalOptions="Center">
+                  HorizontalOptions="Center">
     <Image x:Name="ButtonBgImage"
            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
@@ -32,7 +30,6 @@
            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
            Opacity="0.6"
            TextColor="White"
-           FontSize="52"
            LineBreakMode="TailTruncation"
            HorizontalTextAlignment="Center"
            Text="{Binding CurrentStateDescription.Label}" />
index b7a8170c78152cdaa39021dfdbd4dd77aea26b5e..c8e8d22df9632285c3ff9a43251000930301e9c2 100755 (executable)
@@ -25,12 +25,21 @@ namespace TVHome.Controls
     /// </summary>
     public partial class SubPanelAllAppsButton : PanelButton
     {
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int selectTransitionHeight = SizeUtils.GetHeightSize(22);
+
         /// <summary>
         /// Constructor
         /// </summary>
         public SubPanelAllAppsButton()
         {
             InitializeComponent();
+
+            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(236);
+            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(240);
+            ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
         }
 
         /// <summary>
@@ -62,7 +71,7 @@ namespace TVHome.Controls
 
 #pragma warning disable CS4014
             ButtonTitle.FadeTo(0.99, 300);
-            ButtonTitle.TranslateTo(0, 22, 300);
+            ButtonTitle.TranslateTo(0, selectTransitionHeight, 300);
             ButtonImage.ScaleTo(1.3, 300);
 #pragma warning restore CS4014
             await ButtonBgImage.ScaleTo(1.3, 300);
index b41d065867ec69c3f5bee3b5f891cdda8de145f2..269ec4be30f9f57dd26fd8543703386a66d15bc7 100755 (executable)
@@ -4,9 +4,7 @@
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelButton">
   <RelativeLayout x:Name="ButtonBox"
-               WidthRequest="182"
-               HeightRequest="230"
-               HorizontalOptions="Center">
+                  HorizontalOptions="Center">
     <Image x:Name="ButtonImage"
            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
@@ -26,7 +24,6 @@
            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
            Opacity="0.6"
            TextColor="White"
-           FontSize="52"
            LineBreakMode="TailTruncation"
            HorizontalTextAlignment="Center"
            Text="{Binding CurrentStateDescription.Label}" />
index b122179322666024dc298f83d974f088a28c0938..764e6602c55cab3a6245f3155b833c14349ef14d 100755 (executable)
@@ -27,15 +27,35 @@ namespace TVHome.Controls
     /// </summary>
     public partial class SubPanelButton : PanelButton
     {
+        /// <summary>
+        /// A flag which enable showing a popup
+        /// </summary>
         private bool isPopupShowing = false;
+
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int selectTransitionHeight = SizeUtils.GetHeightSize(22);
+
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int moveTransitionHeight = SizeUtils.GetHeightSize(130);
+
         /// <summary>
         /// Constructor
         /// </summary>
         public SubPanelButton()
         {
             InitializeComponent();
+
+            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(236);
+            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(240);
+            ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
+
             //InitializeLongTapGesture();
         }
+
         /*
         private void InitializeLongTapGesture()
         {
@@ -128,7 +148,7 @@ namespace TVHome.Controls
             if (moveMode)
             {
                 ButtonTitle.FadeTo(0, 300);
-                View.TranslateTo(0, -130, 300);
+                View.TranslateTo(0, -moveTransitionHeight, 300);
                 ButtonImage.ScaleTo(1, 300);
                 isMoveMode = true;
 
@@ -139,6 +159,7 @@ namespace TVHome.Controls
                     LeftBtnImg.FadeTo(0, 300);
                     await RightBtnImg.FadeTo(0, 300);
                 }
+
                 LeftBtnImg.FadeTo(1, 300);
                 await RightBtnImg.FadeTo(1, 300);
             }
@@ -190,7 +211,7 @@ namespace TVHome.Controls
 
 #pragma warning disable CS4014
             ButtonTitle.FadeTo(0.99, 300);
-            ButtonTitle.TranslateTo(0, 22, 300);
+            ButtonTitle.TranslateTo(0, selectTransitionHeight, 300);
 #pragma warning restore CS4014
             await ButtonImage.ScaleTo(1.3, 300);
         }
index b40730abaef6afcc48943996b754a9a489f10563..f05dbf4b3b5d4191497b23b44d3a7cb6ccaf05e6 100755 (executable)
@@ -4,9 +4,7 @@
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelReservedButton">
   <RelativeLayout x:Name = "ButtonBox"
-               HeightRequest="230"
-               WidthRequest="182"
-               HorizontalOptions="Center">
+                  HorizontalOptions="Center">
     <Image x:Name="ButtonBgImage"
            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
@@ -32,7 +30,6 @@
            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
            Opacity="0.6"
            TextColor="White"
-           FontSize="52"
            LineBreakMode="TailTruncation"
            HorizontalTextAlignment="Center"
            Text="{Binding CurrentStateDescription.Label}" />
index cbc791cfc12909f0937ed23cb63241bed05aed2b..2b18a44afff6138144044332daaf516e1be5a70e 100755 (executable)
@@ -26,12 +26,21 @@ namespace TVHome.Controls
     /// </summary>
     public partial class SubPanelReservedButton : PanelButton
     {
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int selectTransitionHeight = SizeUtils.GetHeightSize(22);
+
         /// <summary>
         /// Constructor
         /// </summary>
         public SubPanelReservedButton()
         {
             InitializeComponent();
+
+            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(236);
+            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(240);
+            ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
         }
 
         /// <summary>
@@ -63,7 +72,7 @@ namespace TVHome.Controls
 
 #pragma warning disable CS4014
             ButtonTitle.FadeTo(0.99, 300);
-            ButtonTitle.TranslateTo(0, 22, 300);
+            ButtonTitle.TranslateTo(0, selectTransitionHeight, 300);
             ButtonImage.ScaleTo(1.3, 300);
 #pragma warning restore CS4014
             await ButtonBgImage.ScaleTo(1.3, 300);
index 0427bdbb99c3254e22cab24b3e27e6e8357a0821..45a7e8430d873448cbf0a21315753fe38bf0bb0a 100755 (executable)
@@ -4,9 +4,7 @@
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelSettingButton">
   <RelativeLayout x:Name="ButtonBox"
-               WidthRequest="182"
-               HeightRequest="230"
-               HorizontalOptions="Center" >
+                  HorizontalOptions="Center" >
     <Image x:Name="ButtonImage"
            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
@@ -26,7 +24,6 @@
            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
            Opacity="0.6"
            TextColor="White"
-           FontSize="38"
            LineBreakMode="TailTruncation"
            HorizontalTextAlignment="Center"
            Text="{Binding CurrentStateDescription.Label}"/>
index d491734bbb6bb9d8037f0a05781d1b9e17e01de8..a298c4912700673f9c669e05cffba93c53220c90 100755 (executable)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+using LibTVRefCommonPortable.Utils;
 using System;
 using Xamarin.Forms;
 
@@ -24,12 +25,21 @@ namespace TVHome.Controls
     /// </summary>
     public partial class SubPanelSettingButton : PanelButton
     {
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int selectTransitionHeight = SizeUtils.GetHeightSize(22);
+
         /// <summary>
         /// A Constructor
         /// </summary>
         public SubPanelSettingButton()
         {
             InitializeComponent();
+
+            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(236);
+            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(240);
+            ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
         }
 
         /// <summary>
@@ -61,7 +71,7 @@ namespace TVHome.Controls
 
 #pragma warning disable CS4014
             ButtonTitle.FadeTo(0.99, 300);
-            ButtonTitle.TranslateTo(0, 22, 300);
+            ButtonTitle.TranslateTo(0, selectTransitionHeight, 300);
 #pragma warning restore CS4014
             await ButtonImage.ScaleTo(1.3, 300);
         }
index 1ac9573609b77506dbd4ec12f745a3b2efae69cd..a1c36c2eedc1e704bb9b580bf79742844ab38b36 100755 (executable)
@@ -3,47 +3,40 @@
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelThumbnailButton">
-    <RelativeLayout Opacity="0.99">
-        <BoxView x:Name="ButtonBox"
-                WidthRequest="320"
-                HeightRequest="180"
-                Opacity="0"/>
-        <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}"
-                Source="{Binding ScreenshotPath}" />
-        <Image x:Name="ThumbnailGradient"
-                RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
-                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-                Source="ic_tizen_list_thumbnail_gradient_normal.9.png" />
-        <Image x:Name="ThumbnailIcon"
-                RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.043}"
-                RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.689}"
-                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.131}"
-                RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.233}"
-                Source="{Binding CurrentStateDescription.IconPath}" />
-        <Label x:Name="ThumbnailTitle"
-                RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.206}"
-                RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.722}"
-                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75}"
-                RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.166}"
-                LineBreakMode="TailTruncation"
-                HorizontalTextAlignment="Start"
-                VerticalTextAlignment="Center"
-                Text="{Binding CurrentStateDescription.Label}"
-                TextColor="#FFFFFF"
-                FontSize="70"/>
-        <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}"
-                Focused="OnFocused"
-                Unfocused="OnUnfocused"
-                Clicked="OnClicked"
-                Opacity="0" />
-    </RelativeLayout>
+  <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}"
+            Source="{Binding ScreenshotPath}" />
+    <Image x:Name="ThumbnailGradient"
+            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
+            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+            Source="ic_tizen_list_thumbnail_gradient_normal.9.png" />
+    <Image x:Name="ThumbnailIcon"
+            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.043}"
+            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.689}"
+            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.131}"
+            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.233}"
+            Source="{Binding CurrentStateDescription.IconPath}" />
+    <Label x:Name="ThumbnailTitle"
+            RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.206}"
+            RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.722}"
+            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75}"
+            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.166}"
+            LineBreakMode="TailTruncation"
+            Text="{Binding CurrentStateDescription.Label}"
+            TextColor="#FFFFFF"/>
+    <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}"
+            Focused="OnFocused"
+            Unfocused="OnUnfocused"
+            Clicked="OnClicked"
+            Opacity="0" />
+  </RelativeLayout>
 </Controls:PanelButton>
\ No newline at end of file
index 00bd0a2e072f251826401acd4bd09e7638f707b7..a91eb4e869fb61d7540cd924ce8a1e2b55fd978a 100755 (executable)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+using LibTVRefCommonPortable.Utils;
 using System;
 using Tizen.Xamarin.Forms.Extension;
 using Xamarin.Forms;
@@ -24,15 +25,25 @@ namespace TVHome.Controls
     /// </summary>
     public partial class SubPanelThumbnailButton : PanelButton
     {
+        /// <summary>
+        /// A flag which will enable showing a popup.
+        /// </summary>
         private bool isPopupShowing = false;
+
         /// <summary>
         /// Constructor
         /// </summary>
         public SubPanelThumbnailButton()
         {
             InitializeComponent();
+
+            ButtonBox.WidthRequest = SizeUtils.GetWidthSize(320);
+            ButtonBox.HeightRequest = SizeUtils.GetHeightSize(180);
+            ThumbnailTitle.FontSize = SizeUtils.GetFontSize(26);
+
             //InitializeLongTapGesture();
         }
+
         /*
         private void InitializeLongTapGesture()
         {
index 21e8325404201b84d5035833f39f7b3e4add4ad4..4c2fc5326719b2b2062297ddfea1f774ef5389a7 100755 (executable)
@@ -78,8 +78,15 @@ namespace TVHome
         /// A Constructor
         /// Sets main page to MainPage instance
         /// </summary>
-        public App()
+        /// <param name="screenWidth">Screen Width</param>
+        /// <param name="screenHeight">Screen Height</param>
+        /// <param name="scaleRatio">Scale ratio</param>
+        public App(int screenWidth, int screenHeight, double scaleRatio)
         {
+            SizeUtils.ScreenWidth = screenWidth;
+            SizeUtils.ScreenHeight = screenHeight;
+            SizeUtils.ScaleRatio = scaleRatio;
+
             MainPage = new MainPage();
         }
 
index 0e95d4418647b45acc5acf45d8089215b7e781f9..f79b72c28e2b9e61567938b0dbd7d641558860c4 100755 (executable)
@@ -110,6 +110,63 @@ namespace TVHome.ViewModels
         /// </summary>
         public event PropertyChangedEventHandler PropertyChanged;
 
+        /// <summary>
+        /// Main panel icon's width
+        /// </summary>
+        public int MainPanelIconWidth
+        {
+            get
+            {
+                return SizeUtils.GetWidthSize(236);
+            }
+        }
+
+        /// <summary>
+        /// Sub panel's padding size
+        /// </summary>
+        public Thickness SubPanelPadding
+        {
+            get
+            {
+                int lr = SizeUtils.GetWidthSize(74);
+                return new Thickness(lr, 0, lr, SizeUtils.GetWidthSize(26));
+            }
+        }
+
+        /// <summary>
+        /// Sub panel's spacing size
+        /// </summary>
+        public int SubPanelSpacing
+        {
+            get
+            {
+                // TODO : set proper size
+                return SizeUtils.GetWidthSize(34);
+            }
+        }
+
+        /// <summary>
+        /// Information text font size.
+        /// </summary>
+        public int NoContentInformationFontSize
+        {
+            get
+            {
+                return SizeUtils.GetFontSize(28);
+            }
+        }
+
+        /// <summary>
+        /// Sub thumbnail panel's padding size
+        /// </summary>
+        public Thickness SubThumbNailPanelPadding
+        {
+            get
+            {
+                return new Thickness(SizeUtils.GetHeightSize(223), SizeUtils.GetWidthSize(32));
+            }
+        }
+
         /// <summary>
         /// Constructor
         /// Initialize MainPanel, SubPanel, Command and EventListeners
@@ -222,14 +279,22 @@ namespace TVHome.ViewModels
             // TODO : Revert this before release
             //string[] AppControlID = { "org.tizen.settings", "org.tizen.apps", "org.tizen.settings" };
             string[] AppControlID = { "org.tizen.xaapps", "org.tizen.xaapps", "org.tizen.settings" };
-            string[] AppDefaultIconPath = { "ic_tizen_home_menu_recent_normal.png", "ic_tizen_home_menu_apps_normal.png", "ic_tizen_home_menu_settings_normal.png" };
-            string[] AppFocusedIconPath = { "ic_tizen_home_menu_recent_focused.png", "ic_tizen_home_menu_apps_focused.png", "ic_tizen_home_menu_settings_focused.png" };
-            string[] AppSelectedIconPath = { "ic_tizen_home_menu_recent_selected.png", "ic_tizen_home_menu_apps_selected.png", "ic_tizen_home_menu_settings_selected.png" };
-            string[] AppUnselectIconPath = { "ic_tizen_home_menu_recent_unselect.png", "ic_tizen_home_menu_apps_unselect.png", "ic_tizen_home_menu_settings_unselect.png" };
+            string[] AppIconPath =
+                {
+                "ic_tizen_home_menu_{0}_normal.png",
+                "ic_tizen_home_menu_{0}_focused.png",
+                "ic_tizen_home_menu_{0}_selected.png",
+                "ic_tizen_home_menu_{0}_unselect.png"
+            };
 
             List<ShortcutInfo> TempList = new List<ShortcutInfo>();
             for (int i = 0; i < AppName.Length; i++)
             {
+                AppControlAction appControlAction = new AppControlAction()
+                {
+                    AppID = AppControlID[i]
+                };
+
                 ShortcutInfo shortcutInfo = new HomeMenuAppShortcutInfo()
                 {
                     StateDescriptions =
@@ -239,11 +304,8 @@ namespace TVHome.ViewModels
                             new StateDescription
                             {
                                 Label = AppName[i],
-                                IconPath = AppDefaultIconPath[i],
-                                Action = new AppControlAction()
-                                {
-                                    AppID = AppControlID[i]
-                                }
+                                IconPath = String.Format(AppIconPath[0], AppName[i].ToLower()),
+                                Action = appControlAction,
                             }
                         },
                         {
@@ -251,11 +313,8 @@ namespace TVHome.ViewModels
                             new StateDescription
                             {
                                 Label = AppName[i],
-                                IconPath = AppFocusedIconPath[i],
-                                Action = new AppControlAction()
-                                {
-                                    AppID = AppControlID[i]
-                                }
+                                IconPath = String.Format(AppIconPath[1], AppName[i].ToLower()),
+                                Action = appControlAction,
                             }
                         },
                         {
@@ -263,11 +322,8 @@ namespace TVHome.ViewModels
                             new StateDescription
                             {
                                 Label = AppName[i],
-                                IconPath = AppSelectedIconPath[i],
-                                Action = new AppControlAction()
-                                {
-                                    AppID = AppControlID[i]
-                                }
+                                IconPath = String.Format(AppIconPath[2], AppName[i].ToLower()),
+                                Action = appControlAction,
                             }
                         },
                         {
@@ -275,11 +331,8 @@ namespace TVHome.ViewModels
                             new StateDescription
                             {
                                 Label = AppName[i],
-                                IconPath = AppUnselectIconPath[i],
-                                Action = new AppControlAction()
-                                {
-                                    AppID = AppControlID[i]
-                                }
+                                IconPath = String.Format(AppIconPath[3], AppName[i].ToLower()),
+                                Action = appControlAction,
                             }
                         },
                     },
@@ -317,11 +370,51 @@ namespace TVHome.ViewModels
         /// </summary>
         private void MakeSettingsButtons()
         {
-            string[] ShortCutLabel = { "Settings", "Brightness", "Contrast", "Color", "Tint" };
+            string[] ShortCutLabel = { "Brightness", "Contrast", "Color", "Tint" };
+            string[] shortCutActionID = { "org.tizen.settings", "org.tizen.settings", "org.tizen.settings", "org.tizen.settings" };
 
             List<ShortcutInfo> TempList = new List<ShortcutInfo>();
+
+            ShortcutInfo Settings = new SettingShortcutInfo()
+            {
+                StateDescriptions =
+                {
+                    {
+                        "default",
+                        new StateDescription
+                        {
+                            Label = "All Settings",
+                            IconPath = "ic_home_settings_all_138.png",
+                            Action = new AppControlAction()
+                            {
+                                AppID = "org.tizen.settings"
+                            }
+                        }
+                    },
+                    {
+                        "focused",
+                        new StateDescription
+                        {
+                            Label = "All Settings",
+                            IconPath = "ic_home_settings_all_182.png",
+                            Action = new AppControlAction()
+                            {
+                                AppID = "org.tizen.settings"
+                            }
+                        }
+                    },
+                }
+            };
+            Settings.UpdateState();
+            TempList.Add(Settings);
+
             for (int i = 0; i < ShortCutLabel.Length; i++)
             {
+                AppControlAction appControlAction = new AppControlAction()
+                {
+                    AppID = shortCutActionID[i]
+                };
+
                 ShortcutInfo shortcutInfo = new SettingShortcutInfo()
                 {
                     StateDescriptions =
@@ -331,11 +424,17 @@ namespace TVHome.ViewModels
                             new StateDescription
                             {
                                 Label = ShortCutLabel[i],
-                                IconPath = "ic_tizen_home_menu_settings_normal.png",
-                                Action = new AppControlAction()
-                                {
-                                    AppID = "org.tizen.settings"
-                                }
+                                IconPath = "ic_home_settings_" + ShortCutLabel[i].ToLower() + "_138.png",
+                                Action = appControlAction,
+                            }
+                        },
+                        {
+                            "focused",
+                            new StateDescription
+                            {
+                                Label = ShortCutLabel[i],
+                                IconPath = "ic_home_settings_" + ShortCutLabel[i].ToLower() + "_182.png",
+                                Action = appControlAction,
                             }
                         },
                     },
@@ -379,6 +478,7 @@ namespace TVHome.ViewModels
         /// <summary>
         /// Removes specified recent application and updates the list to Recent SubPanel
         /// </summary>
+        /// <param name="appId">A application ID</param>
         private void RemoveRecentApplication(string appId)
         {
             TVHomeImpl.GetInstance.RecentShortcutControllerInstance.Remove(appId);
index eae6296378c8be85b8d4666780c1909a8e15374a..f1c3b9b814aa3b48f9ffed4656d39ee99a321eec 100755 (executable)
@@ -66,7 +66,7 @@ namespace TVHome.Views
         private async void Iconified()
         {
 #pragma warning disable CS4014
-            SubPanelDictionary[SelectedMenuName]?.TranslateTo(0.0, 100, 150);
+            SubPanelDictionary[SelectedMenuName]?.TranslateTo(0.0, SizeUtils.GetWidthSize(100), 150);
             DimmedBgImage.FadeTo(0.0, 150);
 #pragma warning restore CS4014
             await PageMainPanel.ScaleTo(0.0, 150);
@@ -222,6 +222,7 @@ namespace TVHome.Views
             {
                 AppsSubPanel.ChangeToDefaultMode();
             }
+
             return true;
         }
     }
index 4f5892e78d300997f273a3abd3eda2f43320d792..25c4cb705ba61a20ab072b70faf4eca5086c95c7 100644 (file)
@@ -7,9 +7,9 @@
     <Grid x:Name="PanelButtonGrid">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="*" />
-            <ColumnDefinition Width="236" />
-            <ColumnDefinition Width="236" />
-            <ColumnDefinition Width="236" />
+            <ColumnDefinition Width="{Binding MainPanelIconWidth}" />
+            <ColumnDefinition Width="{Binding MainPanelIconWidth}" />
+            <ColumnDefinition Width="{Binding MainPanelIconWidth}" />
             <ColumnDefinition Width="*" />
         </Grid.ColumnDefinitions>
         <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
index 8ef8b4f0c114af63c6995bf6f380dc302c104eef..fc02f4d3fc778e713b56ed2f27ae8216d42d1c0c 100755 (executable)
@@ -20,6 +20,7 @@ using LibTVRefCommonPortable.DataModels;
 using TVHome.ViewModels;
 using Xamarin.Forms;
 using System.Threading.Tasks;
+using LibTVRefCommonPortable.Utils;
 
 namespace TVHome.Views
 {
@@ -28,6 +29,11 @@ namespace TVHome.Views
     /// </summary>
     public partial class MainPanel : Panel
     {
+        /// <summary>
+        /// MainPanel icon's transition height value when it focused.
+        /// </summary>
+        private int selectTransitionHeight = SizeUtils.GetHeightSize(-78);
+
         /// <summary>
         /// Constructor
         /// </summary>
@@ -67,7 +73,7 @@ namespace TVHome.Views
                 {
                     item.DoAction();
                 });
-                PanelButtonGrid.Children.Add(button.View,index,0);
+                PanelButtonGrid.Children.Add(button.View, index, 0);
 
                 index++;
                 menuIndex++;
@@ -107,7 +113,7 @@ namespace TVHome.Views
         public async void SelectPanel()
         {
             await Task.Delay(300);
-            await this.TranslateTo(0, -78, 300);
+            await this.TranslateTo(0, selectTransitionHeight, 300);
         }
 
         /// <summary>
index 5f6815c6d8a4535524f838cb5efd1d7b8b0df4b3..9e89e08ddd84050a42345559224314bc7ec1f217 100755 (executable)
@@ -8,8 +8,8 @@
               HorizontalOptions="Center">
     <StackLayout x:Name="PanelButtonStack"
                  Orientation="Horizontal"
-                 Padding="74,0,74,26"
-                 Spacing="34">
+                 Padding="{Binding SubPanelPadding}"
+                 Spacing="{Binding SubPanelSpacing}">
     </StackLayout>
   </ScrollView>
 </Views:Panel>
\ No newline at end of file
index 21dece5838f90ab32b756a3f1426c7d99cab9914..8917838c337c95736dd0a77bf5ff2e69ed5b62c7 100755 (executable)
@@ -21,6 +21,7 @@ using Xamarin.Forms;
 using System.Threading.Tasks;
 using System.Windows.Input;
 using System.Collections.Generic;
+using LibTVRefCommonPortable.Utils;
 
 namespace TVHome.Views
 {
@@ -44,6 +45,11 @@ namespace TVHome.Views
         /// </summary>
         public ICommand OnMoveCommand { get; set; }
 
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int selectTransitionHeight = SizeUtils.GetHeightSize(146);
+
         /// <summary>
         /// Constructor
         /// </summary>
@@ -135,6 +141,7 @@ namespace TVHome.Views
                             }
                         });
                     }
+
                     ButtonList.Add(button);
                 }
                 else
@@ -197,7 +204,7 @@ namespace TVHome.Views
 
 #pragma warning disable CS4014
             PanelScrollView.ScrollToAsync(0, 0, true);
-            this.TranslateTo(0, 146, 300);
+            this.TranslateTo(0, selectTransitionHeight, 300);
 #pragma warning restore CS4014
             await this.FadeTo(0, 300);
         }
@@ -243,7 +250,7 @@ namespace TVHome.Views
 
             await Task.Delay(300);
 #pragma warning disable CS4014
-            this.TranslateTo(0, -146, 300);
+            this.TranslateTo(0, -selectTransitionHeight, 300);
 #pragma warning restore CS4014
             await this.FadeTo(0.99, 300);
         }
@@ -283,7 +290,7 @@ namespace TVHome.Views
             View nextItemView = ButtonViewList[nextIndex];
 
             originItemView.TranslateTo(originItemView.TranslationX + 216, originItemView.TranslationY, 300);
-            nextItemView.TranslateTo(nextItemView .TranslationX- 216, 0, 300);
+            nextItemView.TranslateTo(nextItemView.TranslationX - 216, 0, 300);
 
             ButtonViewList[index] = nextItemView;
             ButtonViewList[nextIndex] = originItemView;
index 8e78ccd7cf7d3cace092c73a662eff5fd080c523..32f2fb49115af61a22b6eb169d8ffb71bed2c784 100755 (executable)
@@ -14,7 +14,7 @@
                     RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}" >
             <StackLayout x:Name="PanelButtonStack"
                         Orientation="Horizontal"
-                        Padding="222.61,31.65,222.61,31.65"
+                        Padding="{Binding SubThumbNailPanelPadding}"
                         IsVisible="true">
             </StackLayout>
         </ScrollView>
@@ -33,7 +33,7 @@
                   RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=BackgroundBox ,Property=Width, Factor=0.28858}"
                   Text="No Content to display"
                   HorizontalTextAlignment="Center"
-                  FontSize="40"
+                  FontSize="{Binding NoContentInformationFontSize}"
                   TextColor="White" />
         </RelativeLayout>
     </RelativeLayout>
index e690a2cf82087ee19a3fb5a1a8d1e89ade40ba72..3e8beb1fab42c6e06e73e59d32b80d33e4be1d96 100755 (executable)
@@ -30,11 +30,16 @@ namespace TVHome.Views
     /// </summary>
     public partial class SubThumbnailPanel : Panel
     {
+        /// <summary>
+        /// A list has panel button that consist of this SubThumbnailPanel.
+        /// </summary>
         private List<PanelButton> ButtonList;
+
         /// <summary>
         /// Identifies the ShowNoContentsInfo bindable property
         /// </summary>
         public static readonly BindableProperty ShowNoContentsInfoProperty = BindableProperty.Create("ShowNoContentsInfo", typeof(bool), typeof(SubThumbnailPanel), default(bool));
+
         /// <summary>
         /// A flag indicates whether displaying "no content info" is needed or not
         /// </summary>
@@ -44,6 +49,11 @@ namespace TVHome.Views
             set { SetValue(ShowNoContentsInfoProperty, value); }
         }
 
+        /// <summary>
+        /// SubPanel icon's transition height value when it focused.
+        /// </summary>
+        private int selectTransitionHeight = SizeUtils.GetHeightSize(140);
+
         /// <summary>
         /// Constructor
         /// </summary>
@@ -156,7 +166,7 @@ namespace TVHome.Views
 
 #pragma warning disable CS4014
                 PanelScrollView.ScrollToAsync(0, 0, true);
-                this.TranslateTo(0, 140, 300);
+                this.TranslateTo(0, selectTransitionHeight, 300);
 #pragma warning restore CS4014
                 await this.FadeTo(0, 300);
             }
@@ -205,7 +215,7 @@ namespace TVHome.Views
 
             await Task.Delay(300);
 #pragma warning disable CS4014
-            this.TranslateTo(0, -140, 300);
+            this.TranslateTo(0, -selectTransitionHeight, 300);
 #pragma warning restore CS4014
             await this.FadeTo(0.99, 300);
         }