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 a78fca8caefc98032c77e2256cf40d1546fccd86..fadc6f04f95ecc6aea4c49a95d932bd2677ef06a 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 41355cbd9b5a169c15157a5c613c3932ed0f2fb7..36a5d564ff121436ff5e274fc5a4ebe7015298e4 100755 (executable)
@@ -45,6 +45,20 @@ namespace TVApps.Controls
             set { SetValue(ItemsSourceProperty, value); }
         }
 
+        /// <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>
index cae1c747dfb0204e38bae20d5a9633b9769f0ad4..06ddea9a4e324f15ece27110f3952a22fe720161 100755 (executable)
@@ -107,6 +107,20 @@ namespace TVApps.Views
             set { SetValue(ButtonPinDoneCommandProperty, value); }
         }
 
+        /// <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>
@@ -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 b13294632ae7d7970a5e065c910fa0edfe3e72ad..265834926dd5ce26e79c97a9002b94c9f44c96ad 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 c801692bd6b9239198c6ff9517dcf4252d47f4e7..161eea64200041cb6b38ab3e3203f493ede40296 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: