Implement Apps according to new UI/GUI guideline
authorHyerim Kim <rimi.kim@samsung.com>
Fri, 21 Apr 2017 08:46:31 +0000 (17:46 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:53 +0000 (18:34 +0900)
 - Change backkey information
 - Change from TVButton to Button
 - Add Header Additional information
 - Focusing first item after dismissed Quit popup

Change-Id: Ic8026b6271ac5082cfdebc0b8c271448142e20bc
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
14 files changed:
TVApps/TVApps/Controls/AppItemCell.xaml
TVApps/TVApps/ViewModels/MainPageViewModel.cs [changed mode: 0644->0755]
TVApps/TVApps/Views/FooterDeleteStatus.xaml [changed mode: 0644->0755]
TVApps/TVApps/Views/FooterDeleteStatus.xaml.cs
TVApps/TVApps/Views/FooterNormalStatus.xaml.cs
TVApps/TVApps/Views/FooterPinStatus.xaml [changed mode: 0644->0755]
TVApps/TVApps/Views/FooterPinStatus.xaml.cs
TVApps/TVApps/Views/MainPage.xaml
TVApps/TVApps/Views/MainPage.xaml.cs
TVHome/TVHome.TizenTV/TVHome.TizenTV.csproj
TVHome/TVHome.TizenTV/res/ic_apps_additional_back.png [new file with mode: 0755]
TVHome/TVHome.TizenTV/res/ic_apps_launcher_checkmark.png [moved from TVHome/TVHome.TizenTV/res/ic_tizen_apps_launcher_checkmark.png with 100% similarity, mode: 0755]
TVHome/TVHome.TizenTV/res/ic_apps_launcher_pinmark.png [moved from TVHome/TVHome.TizenTV/res/ic_tizen_apps_launcher_pinmark.png with 100% similarity, mode: 0755]
TVHome/TVHome.TizenTV/res/ic_tizen_apps_additional_back.png [deleted file]

index 79a3e46..9c55546 100755 (executable)
@@ -24,7 +24,7 @@
                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.5853}"
                RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.3918}"
                RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.3}"
-               Source="ic_tizen_apps_launcher_pinmark.png"
+               Source="ic_apps_launcher_pinmark.png"
                Opacity="0" />
         <Grid x:Name="TextArea"
               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.0936}"
@@ -47,7 +47,7 @@
             <Image x:Name="PinnedIcon"
                    Grid.Row="1"
                    Grid.Column="1"
-                   Source="ic_tizen_apps_launcher_checkmark.png"
+                   Source="ic_apps_launcher_checkmark.png"
                    Opacity="0"/>
             <Label x:Name="ButtonTitle"
                    Grid.Row="0"
                 <RowDefinition Height="*" />
             </Grid.RowDefinitions>
             <Grid.RowSpacing>0</Grid.RowSpacing>
-          <Control:TVButton x:Name="OptionMenuPinToggleButton"
+          <Button x:Name="OptionMenuPinToggleButton"
                             Grid.Row="0"
                             Command="{Binding OptionMenuPinToggleCommand}"
                             IsEnabled="false"
                             Text="UNPIN" />
-          <Control:TVButton x:Name="OptionMenuDeleteButton"
+          <Button x:Name="OptionMenuDeleteButton"
                             Grid.Row="1"
                             Command="{Binding OptionMenuDeleteCommand}"
                             IsEnabled="false"
old mode 100644 (file)
new mode 100755 (executable)
index 557df19..163bd59
@@ -154,6 +154,21 @@ namespace TVApps.ViewModels
             }
         }
 
+        int addtionalInfoTextSize;
+
+        public int AddtionalInfoTextSize
+        {
+            get
+            {
+                if (addtionalInfoTextSize == 0)
+                {
+                    addtionalInfoTextSize = SizeUtils.GetFontSize(32);
+                }
+
+                return addtionalInfoTextSize;
+            }
+        }
+
         /// <summary>
         /// Regular text font size
         /// </summary>
old mode 100644 (file)
new mode 100755 (executable)
index 977ee0d..6c77c0d
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <RelativeLayout xmlns="http://xamarin.com/schemas/2014/forms"
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-      xmlns:Control="clr-namespace:TVApps.Controls"
       x:Class="TVApps.Views.FooterDeleteStatus">
 
 </RelativeLayout>
\ No newline at end of file
index 8b20858..28f172f 100755 (executable)
@@ -15,6 +15,7 @@
  */
 
 using LibTVRefCommonPortable.Utils;
+using System.Windows.Input;
 using TVApps.Controls;
 using Xamarin.Forms;
 
@@ -25,7 +26,8 @@ namespace TVApps.Views
     /// </summary>
     public partial class FooterDeleteStatus : RelativeLayout
     {
-        private TVButton CancelButton;
+        private Button CancelButton;
+
         /// <summary>
         /// A constructor
         /// </summary>
@@ -33,12 +35,12 @@ namespace TVApps.Views
         {
             InitializeComponent();
 
-            CancelButton = new TVButton()
+            CancelButton = new Button()
             {
                 Text = "CANCEL",
             };
 
-            CancelButton.SetBinding(TVButton.CommandProperty, new Binding("ButtonDeleteCancelCommand"));
+            CancelButton.SetBinding(Button.CommandProperty, new Binding("ButtonDeleteCancelCommand"));
 
             this.Children.Add(CancelButton,
                 heightConstraint: Constraint.Constant(SizeUtils.GetHeightSize(80)),
@@ -49,7 +51,7 @@ namespace TVApps.Views
 
         public Button GetCancelButton()
         {
-            return CancelButton.FindByName<Button>("HiddenButton");
+            return CancelButton;
         }
     }
 }
index 38b7e2f..55727f2 100755 (executable)
@@ -32,7 +32,7 @@ namespace TVApps.Views
         private bool isPopupShowing = false;
 
         private DropdownList SortButton;
-        private TVButton OptionButton;
+        private Button OptionButton;
 
         /// <summary>
         /// A command will be executed if the Pin option is selected
@@ -79,7 +79,7 @@ namespace TVApps.Views
 
         private void CreateOptionButton()
         {
-            OptionButton = new TVButton()
+            OptionButton = new Button()
             {
                 Text = "OPTION",
             };
old mode 100644 (file)
new mode 100755 (executable)
index 85f3acd..42e5dc3
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <RelativeLayout xmlns="http://xamarin.com/schemas/2014/forms"
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-      xmlns:Control="clr-namespace:TVApps.Controls"
       x:Class="TVApps.Views.FooterPinStatus">
 
 </RelativeLayout>
\ No newline at end of file
index a2f83c6..893fcc8 100755 (executable)
@@ -15,6 +15,7 @@
  */
 
 using LibTVRefCommonPortable.Utils;
+using System.Windows.Input;
 using TVApps.Controls;
 using Xamarin.Forms;
 
@@ -25,9 +26,9 @@ namespace TVApps.Views
     /// </summary>
     public partial class FooterPinStatus : RelativeLayout
     {
-        private TVButton DoneButton;
-        private Label SumOfCheckedAppLabel;
-
+        private Button DoneButton;
+        //private Label SumOfCheckedAppLabel;
+        /*
         /// <summary>
         /// Identifies the SumOfCheckedApp bindable property
         /// </summary>
@@ -41,6 +42,7 @@ namespace TVApps.Views
             get { return (int)GetValue(SumOfCheckedAppProperty); }
             set { SetValue(SumOfCheckedAppProperty, value); }
         }
+        */
 
         /// <summary>
         /// A constructor
@@ -50,9 +52,9 @@ namespace TVApps.Views
             InitializeComponent();
 
             CreateDoneButton();
-            CreateFooterAdditionalText();
+            //CreateFooterAdditionalText();
         }
-
+        /*
         private void CreateFooterAdditionalText()
         {
             SetBinding(FooterPinStatus.SumOfCheckedAppProperty, new Binding("SumOfCheckedApp"));
@@ -74,34 +76,35 @@ namespace TVApps.Views
 
             PropertyChanged += FooterPinStatusPropertyChanged;
         }
+        */
 
         private void CreateDoneButton()
         {
-            DoneButton = new TVButton()
+            DoneButton = new Button()
             {
-                Text = "DONE",
+                Text = "Done",
             };
 
-            DoneButton.SetBinding(TVButton.CommandProperty, new Binding("ButtonPinDoneCommand"));
+            DoneButton.SetBinding(Button.CommandProperty, new Binding("ButtonPinDoneCommand"));
 
             this.Children.Add(DoneButton,
                 heightConstraint: Constraint.Constant(SizeUtils.GetHeightSize(80)),
                 widthConstraint: Constraint.Constant(SizeUtils.GetWidthSize(300)),
                 yConstraint: Constraint.Constant(SizeUtils.GetHeightSize(762)),
                 xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(96 + 1130 + 300 + 2)));
-        }
+       }
 
         public Button GetDoneButton()
         {
-            return DoneButton.FindByName<Button>("HiddenButton");
+            return DoneButton;
         }
-
+        /*
         private void FooterPinStatusPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
         {
             if (e.PropertyName.Equals("SumOfCheckedApp"))
             {
                 SumOfCheckedAppLabel.Text = SumOfCheckedApp + " Pinned";
             }
-        }
+        }*/
     }
 }
index 4887e6f..6f940f2 100755 (executable)
@@ -10,7 +10,8 @@
              IsEnabledDeletePopup="{Binding IsEnabledDeletePopup}"
              IsPinAppRequested="{Binding IsPinAppRequested}"
              DeletePopupAppLabel="{Binding DeletePopupAppLabel}"
-             DeletePopupCommand="{Binding DeletePopupCommand}">
+             DeletePopupCommand="{Binding DeletePopupCommand}"
+             SumOfCheckedApp="{Binding SumOfCheckedApp}">
   <ContentPage.BindingContext>
     <ViewModels:MainPageViewModel />
   </ContentPage.BindingContext>
         <Setter Property="FontFamily" Value="Breeze Sans Regular" />
       </Style>
       <Style x:Key="backKeyInfoText" TargetType="Label" >
-        <Setter Property="TextColor" Value="#99FFFFFF" />
+        <Setter Property="TextColor" Value="#FFFFFF" />
         <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+        <Setter Property="Opacity" Value="0.08" />
+      </Style>
+      <Style x:Key="AddionalInfoTextMedium" TargetType="Label" >
+        <Setter Property="TextColor" Value="#FFFFFF" />
+        <Setter Property="FontFamily" Value="Breeze Sans Bold" />
+        <Setter Property="Opacity" Value="0.7" />
+      </Style>
+      <Style x:Key="AddionalInfoTextLight" TargetType="Label" >
+        <Setter Property="TextColor" Value="#FFFFFF" />
+        <Setter Property="FontFamily" Value="Breeze Sans Light" />
+        <Setter Property="Opacity" Value="0.7" />
       </Style>
     </ResourceDictionary>
   </ContentPage.Resources>
            VerticalOptions="CenterAndExpand"
            HorizontalOptions="CenterAndExpand"
            FontSize="{Binding TitleTextSize}"
-           Text="APPS" />
+           Text="APPS"
+           x:Name="TitleLabel"/>
+
+    <Grid Grid.Row="0" x:Name="AddtionalInfo" IsVisible="false">
+      <Grid.ColumnDefinitions>
+        <ColumnDefinition Width="50*" />
+        <ColumnDefinition Width="389*" />
+        <ColumnDefinition Width="122*" />
+        <ColumnDefinition Width="389*" />
+        <ColumnDefinition Width="50*" />
+      </Grid.ColumnDefinitions>
+      <Grid Grid.Row="0" Grid.Column="2" x:Name="AdditionalInfoText">
+        <Grid.ColumnDefinitions>
+          <ColumnDefinition Width="48*" />
+          <ColumnDefinition Width="52*" />
+        </Grid.ColumnDefinitions>
+        <Label Grid.Row="0" Grid.Column="0" x:Name="AdditionalInfoText1"
+            Style="{StaticResource AddionalInfoTextMedium}"
+            HorizontalTextAlignment="Center"
+            VerticalOptions="CenterAndExpand"
+            HorizontalOptions="CenterAndExpand"
+            FontSize="{Binding AddtionalInfoTextSize}" />
+        <Label Grid.Row="0" Grid.Column="1" x:Name="AdditionalInfoText2"
+            Style="{StaticResource AddionalInfoTextLight}"
+            HorizontalTextAlignment="Center"
+            VerticalOptions="CenterAndExpand"
+            HorizontalOptions="CenterAndExpand"
+            FontSize="{Binding AddtionalInfoTextSize}" />
+      </Grid>
+    </Grid>
+
 
-    <Grid Grid.Row="0">
+    <Grid Grid.Row="0" x:Name="Header">
       <Grid.RowDefinitions>
         <RowDefinition Height="37*" />
         <RowDefinition Height="34*" />
                    Grid.ColumnSpan="2"
                    VerticalOptions="FillAndExpand"
                    HorizontalOptions="StartAndExpand"
-                   Orientation="Horizontal">
+                   Orientation="Horizontal"
+                   x:Name="backinfo">
         <Image x:Name="BackKeyInfoImage"
-               Source="ic_tizen_apps_additional_back.png"
+               Source="ic_apps_additional_back.png"
                VerticalOptions="Center"/>
         <Label x:Name="BackKeyInfo"
                Style="{StaticResource backKeyInfoText}"
index a606c86..087eb5b 100755 (executable)
@@ -115,6 +115,20 @@ namespace TVApps.Views
             set { SetValue(DeletePopupCommandProperty, value); }
         }
 
+        /// <summary>
+        /// Identifies the SumOfCheckedApp bindable property
+        /// </summary>
+        public static readonly BindableProperty SumOfCheckedAppProperty = BindableProperty.Create("SumOfCheckedApp", typeof(int), typeof(MainPage), default(int));
+
+        /// <summary>
+        /// Gets or sets count of checked AppItemCell
+        /// </summary>
+        public int SumOfCheckedApp
+        {
+            get { return (int)GetValue(SumOfCheckedAppProperty); }
+            set { SetValue(SumOfCheckedAppProperty, value); }
+        }
+
         /*
         private async void PlayHideAnimation()
         {
@@ -337,25 +351,33 @@ namespace TVApps.Views
                     FooterPin.IsVisible = false;
                     FooterDelete.IsVisible = false;
                     BackKeyInfo.Text = "Quit";
+                    AddtionalInfo.IsVisible = false;
+                    TitleLabel.IsVisible = true;
                     AppList.InitializeFocus();
                     break;
                 case AppsStatus.Pin:
                     FooterNormal.IsVisible = false;
                     FooterPin.IsVisible = true;
                     FooterDelete.IsVisible = false;
-                    BackKeyInfo.Text = "Back";
+                    AddtionalInfo.IsVisible = true;
+                    TitleLabel.IsVisible = false;
+                    BackKeyInfo.Text = "Front";
                     break;
                 case AppsStatus.Delete:
                     FooterNormal.IsVisible = false;
                     FooterPin.IsVisible = false;
                     FooterDelete.IsVisible = true;
-                    BackKeyInfo.Text = "Back";
+                    AddtionalInfo.IsVisible = true;
+                    TitleLabel.IsVisible = false;
+                    BackKeyInfo.Text = "Front";
                     break;
                 case AppsStatus.LongPress:
                     FooterNormal.IsVisible = true;
                     FooterPin.IsVisible = false;
                     FooterDelete.IsVisible = false;
-                    BackKeyInfo.Text = "Back";
+                    AddtionalInfo.IsVisible = false;
+                    TitleLabel.IsVisible = true;
+                    BackKeyInfo.Text = "Front";
                     break;
             }
 
@@ -385,6 +407,11 @@ namespace TVApps.Views
                     DeletePopupCommand?.Execute(ret);
                 }
             }
+            else if (e.PropertyName.Equals("SumOfCheckedApp"))
+            {
+                AdditionalInfoText1.Text = SumOfCheckedApp.ToString() + " Apps";
+                AdditionalInfoText2.Text = "Checked";
+            }
         }
 
         /// <summary>
@@ -409,7 +436,10 @@ namespace TVApps.Views
             if (answer)
             {
                 AppControlUtils.SelfTerminate();
-                return true;
+            }
+            else
+            {
+                AppList.InitializeFocus();
             }
 
             return true;
index d8ad71b..da00fe4 100755 (executable)
@@ -99,6 +99,9 @@
     <Content Include="res\btn_tizen_option_menu_nocontent_bg.9.png" />
     <Content Include="res\focus_circle.png" />
     <Content Include="res\focus_circle_inverse.png" />
+    <Content Include="res\ic_apps_additional_back.png" />
+    <Content Include="res\ic_apps_launcher_pinmark.png" />
+    <Content Include="res\ic_apps_launcher_checkmark.png" />
     <Content Include="res\ic_black.png" />
     <Content Include="res\ic_blue.png" />
     <Content Include="res\ic_green.png" />
diff --git a/TVHome/TVHome.TizenTV/res/ic_apps_additional_back.png b/TVHome/TVHome.TizenTV/res/ic_apps_additional_back.png
new file mode 100755 (executable)
index 0000000..861fa32
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/ic_apps_additional_back.png differ
diff --git a/TVHome/TVHome.TizenTV/res/ic_tizen_apps_additional_back.png b/TVHome/TVHome.TizenTV/res/ic_tizen_apps_additional_back.png
deleted file mode 100644 (file)
index 1f42b04..0000000
Binary files a/TVHome/TVHome.TizenTV/res/ic_tizen_apps_additional_back.png and /dev/null differ