diff options
author | Hyerim Kim <rimi.kim@samsung.com> | 2017-09-11 14:16:30 +0900 |
---|---|---|
committer | Hyerim Kim <rimi.kim@samsung.com> | 2017-09-11 15:04:39 +0900 |
commit | d357ba3d5c34bd735142e4de3738852ce19095db (patch) | |
tree | 9a5fb024b261caaa385deaaf44356432900d6206 | |
parent | 64d598d0d91e22e9d1a633e0dc7def65a1e6d1bd (diff) | |
download | home-d357ba3d5c34bd735142e4de3738852ce19095db.tar.gz home-d357ba3d5c34bd735142e4de3738852ce19095db.tar.bz2 home-d357ba3d5c34bd735142e4de3738852ce19095db.zip |
Fixed JIRA issue TNEXT-2897submit/tizen_4.0/20170911.075016submit/tizen/20170911.075036accepted/tizen/unified/20170911.160034accepted/tizen/4.0/unified/20170911.155113
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 <rimi.kim@samsung.com>
-rwxr-xr-x | TVApps/TVApps/Views/FooterDeleteStatus.xaml.cs | 11 | ||||
-rwxr-xr-x | TVApps/TVApps/Views/FooterPinStatus.xaml | 3 | ||||
-rwxr-xr-x | TVApps/TVApps/Views/FooterPinStatus.xaml.cs | 46 | ||||
-rwxr-xr-x | TVApps/TVApps/Views/MainPage.xaml.cs | 14 | ||||
-rwxr-xr-x | TVHome/TVHome.Tizen.TV/bin/Debug/TVHome.TizenTV.tpk | bin | 0 -> 1116956 bytes | |||
-rw-r--r-- | packaging/org.tizen.xahome.path | 5 | ||||
-rw-r--r-- | packaging/org.tizen.xahome.service | 7 | ||||
-rw-r--r-- | packaging/org.tizen.xahome.spec | 61 |
8 files changed, 118 insertions, 29 deletions
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 /// <summary> /// The cancel button object /// </summary> - private Button CancelButton; - - /// <summary> - /// Gets Cancel Button - /// </summary> - /// <returns>Returns Cancel Button</returns> - public Button GetCancelButton() - { - return CancelButton; - } + public Button CancelButton { private set; get; } /// <summary> /// 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 @@ <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" - x:Class="TVApps.Views.FooterPinStatus"> + x:Class="TVApps.Views.FooterPinStatus" + ButtonPinDoneCommand="{Binding ButtonPinDoneCommand}"> </RelativeLayout>
\ 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 /// <summary> /// The Done button object /// </summary> - private Button DoneButton; - /// <summary> - /// Gets Done Button - /// </summary> - /// <returns>Returns Done Button object</returns> - public Button GetDoneButton() - { - return DoneButton; - } + public Button DoneButton { private set; get; } /// <summary> /// A Container for additional information labels @@ -101,6 +94,20 @@ namespace TVApps.Views } /// <summary> + /// Identifies the ButtonPinDoneCommand bindable property + /// </summary> + public static readonly BindableProperty ButtonPinDoneCommandProperty = BindableProperty.Create("ButtonPinDoneCommand", typeof(Command), typeof(FooterPinStatus), default(Command)); + + /// <summary> + /// Gets or sets ButtonPinDoneCommand + /// </summary> + public ICommand ButtonPinDoneCommand + { + get { return (ICommand)GetValue(ButtonPinDoneCommandProperty); } + set { SetValue(ButtonPinDoneCommandProperty, value); } + } + + /// <summary> /// A constructor /// </summary> public FooterPinStatus() @@ -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(""); + } + /// <summary> /// This method is called when the properties of FooterPinStatus is changed /// </summary> @@ -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<View> lowerList = AppList.GetAppsLowerList().ToList(); - Button cancelButton = FooterDelete.GetCancelButton(); foreach (var item in lowerList) { Button button = item.FindByName<Button>("ButtonFocusArea"); - button?.On<Tizen>()?.SetNextFocusDownView(cancelButton); + button?.On<Tizen>()?.SetNextFocusDownView(FooterDelete.CancelButton); } if (lowerList.Count > 0) { - cancelButton?.On<Tizen>()?.SetNextFocusUpView(lowerList[lowerList.Count - 1].FindByName<Button>("ButtonFocusArea")); + FooterDelete.CancelButton?.On<Tizen>()?.SetNextFocusUpView(lowerList[lowerList.Count - 1].FindByName<Button>("ButtonFocusArea")); } - cancelButton?.On<Tizen>()?.SetNextFocusLeftView(cancelButton); + FooterDelete.CancelButton?.On<Tizen>()?.SetNextFocusLeftView(FooterDelete.CancelButton); } /// <summary> @@ -362,20 +361,19 @@ namespace TVApps.Views private void SetFocusChainingUpAndDownForPinMode(double scrollX) { List<View> lowerList = AppList.GetAppsLowerList().ToList(); - Button doneButton = FooterPin.GetDoneButton(); foreach (var item in lowerList) { Button button = item.FindByName<Button>("ButtonFocusArea"); - button?.On<Tizen>()?.SetNextFocusDownView(doneButton); + button?.On<Tizen>()?.SetNextFocusDownView(FooterPin.DoneButton); } if (lowerList.Count > 0) { - doneButton?.On<Tizen>()?.SetNextFocusUpView(lowerList[lowerList.Count - 1].FindByName<Button>("ButtonFocusArea")); + FooterPin.DoneButton?.On<Tizen>()?.SetNextFocusUpView(lowerList[lowerList.Count - 1].FindByName<Button>("ButtonFocusArea")); } - doneButton?.On<Tizen>()?.SetNextFocusLeftView(doneButton); + FooterPin.DoneButton?.On<Tizen>()?.SetNextFocusLeftView(FooterPin.DoneButton); } /// <summary> diff --git a/TVHome/TVHome.Tizen.TV/bin/Debug/TVHome.TizenTV.tpk b/TVHome/TVHome.Tizen.TV/bin/Debug/TVHome.TizenTV.tpk Binary files differnew file mode 100755 index 0000000..d5dbd0e --- /dev/null +++ b/TVHome/TVHome.Tizen.TV/bin/Debug/TVHome.TizenTV.tpk diff --git a/packaging/org.tizen.xahome.path b/packaging/org.tizen.xahome.path new file mode 100644 index 0000000..4d7d360 --- /dev/null +++ b/packaging/org.tizen.xahome.path @@ -0,0 +1,5 @@ +[Unit] +Description=This path will tell you that home is ready to launch + +[Path] +PathExists=/run/.wm_ready diff --git a/packaging/org.tizen.xahome.service b/packaging/org.tizen.xahome.service new file mode 100644 index 0000000..1cab992 --- /dev/null +++ b/packaging/org.tizen.xahome.service @@ -0,0 +1,7 @@ +[Unit] +Description=TV Home +Requires=launchpad-process-pool.service +After=launchpad-process-pool.service + +[Service] +ExecStart=/bin/sh -c -l '/usr/bin/aul_test launch org.tizen.xahome' diff --git a/packaging/org.tizen.xahome.spec b/packaging/org.tizen.xahome.spec new file mode 100644 index 0000000..019d4c9 --- /dev/null +++ b/packaging/org.tizen.xahome.spec @@ -0,0 +1,61 @@ +Name: org.tizen.xahome +Summary: TV home application +Version: 1.0.0 +Release: 1 +Group: Applications +License: Flora-1.1 +Source0: %{name}-%{version}.tar.gz +Source1: %{name}.service +Source2: %{name}.path + +BuildRequires: pkgconfig(libtzplatform-config) +Requires(post): /usr/bin/tpk-backend + +%define _sysuserdir systemd/user +%define _servicedir systemd/user/default.target.wants + +%define internal_name org.tizen.xahome +%define preload_tpk_path %{TZ_SYS_RO_APP}/.preload-tpk + +%define build_mode %{nil} + +%ifarch arm armv7l +%define target arm +%endif +%ifarch aarch64 +%define target aarch64 +%endif +%ifarch x86_64 +%define target x86_64 +%endif +%ifarch i386 i486 i586 i686 +%define target i386 +%endif +%description +This is a container package which have preload TPK files + +%prep +%setup -q + +%build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{preload_tpk_path} +install TVHome/TVHome.Tizen.TV/bin/Debug/TVHome.TizenTV.tpk %{buildroot}%{preload_tpk_path}/ +install --directory %{buildroot}%{_prefix}/lib/%{_servicedir} +install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/%{_sysuserdir} +install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/%{_sysuserdir} +ln -sf ../%{name}.path %{buildroot}%{_prefix}/lib/%{_servicedir} + +%post +chsmack %{_prefix}/lib/%{_sysuserdir}/%{name}.service -a "_" +chsmack %{_prefix}/lib/%{_sysuserdir}/%{name}.path -a "_" +chsmack %{_prefix}/lib/%{_servicedir}/%{name}.path -a "_" + +%files +%defattr(-,root,root,-) +%{preload_tpk_path}/*.tpk +%{_prefix}/lib/%{_sysuserdir}/%{name}.service +%{_prefix}/lib/%{_sysuserdir}/%{name}.path +%{_prefix}/lib/%{_servicedir}/%{name}.path |