diff options
author | Hyerim Kim <rimi.kim@samsung.com> | 2017-09-26 20:20:19 +0900 |
---|---|---|
committer | Hyerim Kim <rimi.kim@samsung.com> | 2017-09-26 20:34:58 +0900 |
commit | 06bbdbcc2de64e8575f8bd09393fe4a7d2055c23 (patch) | |
tree | bfb056083ac1bfeee82db7200f7417d4455878cd | |
parent | c7ecedfd38ff156a480964ee5bfd3d8f7c9dd020 (diff) | |
download | home-06bbdbcc2de64e8575f8bd09393fe4a7d2055c23.tar.gz home-06bbdbcc2de64e8575f8bd09393fe4a7d2055c23.tar.bz2 home-06bbdbcc2de64e8575f8bd09393fe4a7d2055c23.zip |
Fixed self-verification issue : TPLAPP-3986, TPLAPP-3987
Change-Id: I8a240796ed6b791d4881f18ac3c0f8e87ec13271
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
-rwxr-xr-x | TVApps/TVApps/Controls/AppListView.xaml | 3 | ||||
-rwxr-xr-x | TVApps/TVApps/Controls/AppListView.xaml.cs | 14 | ||||
-rwxr-xr-x | TVApps/TVApps/Views/FooterPinStatus.xaml.cs | 34 | ||||
-rwxr-xr-x | TVApps/TVApps/Views/MainPage.xaml | 1 | ||||
-rwxr-xr-x | TVApps/TVApps/Views/MainPage.xaml.cs | 15 |
5 files changed, 50 insertions, 17 deletions
diff --git a/TVApps/TVApps/Controls/AppListView.xaml b/TVApps/TVApps/Controls/AppListView.xaml index a78fca8..fadc6f0 100755 --- a/TVApps/TVApps/Controls/AppListView.xaml +++ b/TVApps/TVApps/Controls/AppListView.xaml @@ -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}" diff --git a/TVApps/TVApps/Controls/AppListView.xaml.cs b/TVApps/TVApps/Controls/AppListView.xaml.cs index 41355cb..36a5d56 100755 --- a/TVApps/TVApps/Controls/AppListView.xaml.cs +++ b/TVApps/TVApps/Controls/AppListView.xaml.cs @@ -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; diff --git a/TVApps/TVApps/Views/FooterPinStatus.xaml.cs b/TVApps/TVApps/Views/FooterPinStatus.xaml.cs index cae1c74..06ddea9 100755 --- a/TVApps/TVApps/Views/FooterPinStatus.xaml.cs +++ b/TVApps/TVApps/Views/FooterPinStatus.xaml.cs @@ -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; + } } } } diff --git a/TVApps/TVApps/Views/MainPage.xaml b/TVApps/TVApps/Views/MainPage.xaml index b132946..2658349 100755 --- a/TVApps/TVApps/Views/MainPage.xaml +++ b/TVApps/TVApps/Views/MainPage.xaml @@ -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}"/> diff --git a/TVApps/TVApps/Views/MainPage.xaml.cs b/TVApps/TVApps/Views/MainPage.xaml.cs index c801692..161eea6 100755 --- a/TVApps/TVApps/Views/MainPage.xaml.cs +++ b/TVApps/TVApps/Views/MainPage.xaml.cs @@ -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: |