Fixed self-verification issue : TPLAPP-3986, TPLAPP-3987 94/152594/2
authorHyerim Kim <rimi.kim@samsung.com>
Tue, 26 Sep 2017 11:20:19 +0000 (20:20 +0900)
committerHyerim Kim <rimi.kim@samsung.com>
Tue, 26 Sep 2017 11:34:58 +0000 (20:34 +0900)
Change-Id: I8a240796ed6b791d4881f18ac3c0f8e87ec13271
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
TVApps/TVApps/Controls/AppListView.xaml
TVApps/TVApps/Controls/AppListView.xaml.cs
TVApps/TVApps/Views/FooterPinStatus.xaml.cs
TVApps/TVApps/Views/MainPage.xaml
TVApps/TVApps/Views/MainPage.xaml.cs

index a78fca8..fadc6f0 100755 (executable)
@@ -5,7 +5,8 @@
             xmlns:VM="clr-namespace:TVApps.ViewModels"
             x:Class="TVApps.Controls.AppListView"
             HorizontalOptions="Fill"
-            Orientation="Horizontal">
+            Orientation="Horizontal"
+            IsNoApps="{Binding Path=IsVisible, Source={x:Reference Name=NoContentsView}}">
 
     <RelativeLayout x:Name="AppListGrid"
                     RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
index 41355cb..36a5d56 100755 (executable)
@@ -46,6 +46,20 @@ namespace TVApps.Controls
         }
 
         /// <summary>
+        /// Identifies the IsNoApps bindable property
+        /// </summary>
+        public static readonly BindableProperty IsNoAppsProperty = BindableProperty.Create("IsNoApps", typeof(bool), typeof(AppListView), true);
+
+        /// <summary>
+        /// Gets or sets the value of whether there is no apps or not
+        /// </summary>
+        public bool IsNoApps
+        {
+            get { return (bool)GetValue(IsNoAppsProperty); }
+            set { SetValue(IsNoAppsProperty, value); }
+        }
+
+        /// <summary>
         /// A count of items in list
         /// </summary>
         private int AppCount;
index cae1c74..06ddea9 100755 (executable)
@@ -108,6 +108,20 @@ namespace TVApps.Views
         }
 
         /// <summary>
+        /// Identifies the IsNoApps bindable property
+        /// </summary>
+        public static readonly BindableProperty IsNoAppsProperty = BindableProperty.Create("IsNoApps", typeof(bool), typeof(FooterPinStatus), true);
+
+        /// <summary>
+        /// Gets or sets the value of whether there is no apps or not
+        /// </summary>
+        public bool IsNoApps
+        {
+            get { return (bool)GetValue(IsNoAppsProperty); }
+            set { SetValue(IsNoAppsProperty, value); }
+        }
+
+        /// <summary>
         /// A constructor
         /// </summary>
         public FooterPinStatus()
@@ -178,14 +192,10 @@ namespace TVApps.Views
             {
                 Text = "Done",
                 FontSize = SizeUtils.GetFontSize(28),
-                IsEnabled = false
+                IsEnabled = !IsNoApps
             };
 
             DoneButton.Clicked += DoneButtonClicked;
-            if (SumOfCheckedApp > 0)
-            {
-                IsEnabled = true;
-            }
 
             this.Children.Add(DoneButton,
                 heightConstraint: Constraint.Constant(SizeUtils.GetHeightSize(80)),
@@ -208,15 +218,6 @@ namespace TVApps.Views
         {
             if (e.PropertyName.Equals("SumOfCheckedApp"))
             {
-                if (SumOfCheckedApp > 0)
-                {
-                    DoneButton.IsEnabled = true;
-                }
-                else
-                {
-                    DoneButton.IsEnabled = false;
-                }
-
                 if (pinnedAppCount > SumOfCheckedApp)
                 {
                     AppNameLabel.Text = UnpinnedAppName;
@@ -243,6 +244,11 @@ namespace TVApps.Views
                 additionalInfo.FadeTo(1, 334);
                 pinnedAppCount = SumOfCheckedApp;
             }
+
+            if (e.PropertyName == "IsNoApps")
+            {
+                DoneButton.IsEnabled = !IsNoApps;
+            }
         }
     }
 }
index b132946..2658349 100755 (executable)
@@ -52,6 +52,7 @@
                            Grid.RowSpan="5"
                            x:Name="FooterPin"
                            IsVisible="false"
+                           IsNoApps="{Binding Path=IsNoApps, Source={x:Reference Name=AppList}}"
                            PinnedAppName="{Binding PinnedAppName}"
                            UnpinnedAppName="{Binding UnpinnedAppName}"
                            SumOfCheckedApp="{Binding SumOfCheckedApp}"/>
index c801692..161eea6 100755 (executable)
@@ -191,7 +191,10 @@ namespace TVApps.Views
                 }
                 else
                 {
-                    BackKeyInfo.Text = "Quit";
+                    if (CurrentStatus == AppsStatus.Default)
+                    {
+                        BackKeyInfo.Text = "Quit";
+                    }
                 }
             });
         }
@@ -417,7 +420,15 @@ namespace TVApps.Views
                     FooterNormal.IsVisible = false;
                     FooterPin.IsVisible = true;
                     FooterDelete.IsVisible = false;
-                    BackKeyInfo.Text = "Front";
+                    if (IsPinAppRequested)
+                    {
+                        BackKeyInfo.Text = "Quit";
+                    }
+                    else
+                    {
+                        BackKeyInfo.Text = "Front";
+                    }
+
                     AppList.InitializeFocus();
                     break;
                 case AppsStatus.Delete: