From: Hyerim Kim Date: Tue, 26 Sep 2017 11:20:19 +0000 (+0900) Subject: Fixed self-verification issue : TPLAPP-3986, TPLAPP-3987 X-Git-Tag: submit/tizen_4.0/20171018.081537~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F152594%2F2;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Fixed self-verification issue : TPLAPP-3986, TPLAPP-3987 Change-Id: I8a240796ed6b791d4881f18ac3c0f8e87ec13271 Signed-off-by: Hyerim Kim --- 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}}"> + /// Identifies the IsNoApps bindable property + /// + public static readonly BindableProperty IsNoAppsProperty = BindableProperty.Create("IsNoApps", typeof(bool), typeof(AppListView), true); + + /// + /// Gets or sets the value of whether there is no apps or not + /// + public bool IsNoApps + { + get { return (bool)GetValue(IsNoAppsProperty); } + set { SetValue(IsNoAppsProperty, value); } + } + /// /// A count of items in list /// 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 @@ -107,6 +107,20 @@ namespace TVApps.Views set { SetValue(ButtonPinDoneCommandProperty, value); } } + /// + /// Identifies the IsNoApps bindable property + /// + public static readonly BindableProperty IsNoAppsProperty = BindableProperty.Create("IsNoApps", typeof(bool), typeof(FooterPinStatus), true); + + /// + /// Gets or sets the value of whether there is no apps or not + /// + public bool IsNoApps + { + get { return (bool)GetValue(IsNoAppsProperty); } + set { SetValue(IsNoAppsProperty, value); } + } + /// /// A constructor /// @@ -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: