From: Hyerim Kim Date: Mon, 11 Sep 2017 05:16:30 +0000 (+0900) Subject: Fixed JIRA issue TNEXT-2897 X-Git-Tag: submit/tizen_4.0/20170911.075016^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d357ba3d5c34bd735142e4de3738852ce19095db;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Fixed JIRA issue TNEXT-2897 Adds packaing folder for building RPM package Adds tpk package - When Apps is launched as pin mode, set the Done button's enable value following to whether is there are pinned apps or not. Change-Id: I56f09d5cd90c818e973cc91cd5464d406c00ad75 Signed-off-by: Hyerim Kim --- diff --git a/TVApps/TVApps/Views/FooterDeleteStatus.xaml.cs b/TVApps/TVApps/Views/FooterDeleteStatus.xaml.cs index 8dc85b3..7c7d203 100755 --- a/TVApps/TVApps/Views/FooterDeleteStatus.xaml.cs +++ b/TVApps/TVApps/Views/FooterDeleteStatus.xaml.cs @@ -29,16 +29,7 @@ namespace TVApps.Views /// /// The cancel button object /// - private Button CancelButton; - - /// - /// Gets Cancel Button - /// - /// Returns Cancel Button - public Button GetCancelButton() - { - return CancelButton; - } + public Button CancelButton { private set; get; } /// /// A constructor diff --git a/TVApps/TVApps/Views/FooterPinStatus.xaml b/TVApps/TVApps/Views/FooterPinStatus.xaml index 42e5dc3..a795986 100755 --- a/TVApps/TVApps/Views/FooterPinStatus.xaml +++ b/TVApps/TVApps/Views/FooterPinStatus.xaml @@ -1,6 +1,7 @@  + x:Class="TVApps.Views.FooterPinStatus" + ButtonPinDoneCommand="{Binding ButtonPinDoneCommand}"> \ No newline at end of file diff --git a/TVApps/TVApps/Views/FooterPinStatus.xaml.cs b/TVApps/TVApps/Views/FooterPinStatus.xaml.cs index 25a7db0..cae1c74 100755 --- a/TVApps/TVApps/Views/FooterPinStatus.xaml.cs +++ b/TVApps/TVApps/Views/FooterPinStatus.xaml.cs @@ -15,6 +15,7 @@ */ using LibTVRefCommonPortable.Utils; +using System.Windows.Input; using Xamarin.Forms; using Xamarin.Forms.PlatformConfiguration.TizenSpecific; @@ -28,15 +29,7 @@ namespace TVApps.Views /// /// The Done button object /// - private Button DoneButton; - /// - /// Gets Done Button - /// - /// Returns Done Button object - public Button GetDoneButton() - { - return DoneButton; - } + public Button DoneButton { private set; get; } /// /// A Container for additional information labels @@ -100,6 +93,20 @@ namespace TVApps.Views set { SetValue(UnpinnedAppNameProperty, value); } } + /// + /// Identifies the ButtonPinDoneCommand bindable property + /// + public static readonly BindableProperty ButtonPinDoneCommandProperty = BindableProperty.Create("ButtonPinDoneCommand", typeof(Command), typeof(FooterPinStatus), default(Command)); + + /// + /// Gets or sets ButtonPinDoneCommand + /// + public ICommand ButtonPinDoneCommand + { + get { return (ICommand)GetValue(ButtonPinDoneCommandProperty); } + set { SetValue(ButtonPinDoneCommandProperty, value); } + } + /// /// A constructor /// @@ -171,9 +178,14 @@ namespace TVApps.Views { Text = "Done", FontSize = SizeUtils.GetFontSize(28), + IsEnabled = false }; - DoneButton.SetBinding(Button.CommandProperty, new Binding("ButtonPinDoneCommand")); + DoneButton.Clicked += DoneButtonClicked; + if (SumOfCheckedApp > 0) + { + IsEnabled = true; + } this.Children.Add(DoneButton, heightConstraint: Constraint.Constant(SizeUtils.GetHeightSize(80)), @@ -182,6 +194,11 @@ namespace TVApps.Views xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(96 + 1332 + 96))); } + private void DoneButtonClicked(object sender, System.EventArgs e) + { + ButtonPinDoneCommand?.Execute(""); + } + /// /// This method is called when the properties of FooterPinStatus is changed /// @@ -191,6 +208,15 @@ namespace TVApps.Views { if (e.PropertyName.Equals("SumOfCheckedApp")) { + if (SumOfCheckedApp > 0) + { + DoneButton.IsEnabled = true; + } + else + { + DoneButton.IsEnabled = false; + } + if (pinnedAppCount > SumOfCheckedApp) { AppNameLabel.Text = UnpinnedAppName; diff --git a/TVApps/TVApps/Views/MainPage.xaml.cs b/TVApps/TVApps/Views/MainPage.xaml.cs index 90f0721..c801692 100755 --- a/TVApps/TVApps/Views/MainPage.xaml.cs +++ b/TVApps/TVApps/Views/MainPage.xaml.cs @@ -340,20 +340,19 @@ namespace TVApps.Views private void SetFocusChainingUpAndDownForDeleteMode(double scrollX) { List lowerList = AppList.GetAppsLowerList().ToList(); - Button cancelButton = FooterDelete.GetCancelButton(); foreach (var item in lowerList) { Button button = item.FindByName