/// <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
<?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
*/
using LibTVRefCommonPortable.Utils;
+using System.Windows.Input;
using Xamarin.Forms;
using Xamarin.Forms.PlatformConfiguration.TizenSpecific;
/// <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
}
/// <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()
{
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)),
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>
{
if (e.PropertyName.Equals("SumOfCheckedApp"))
{
+ if (SumOfCheckedApp > 0)
+ {
+ DoneButton.IsEnabled = true;
+ }
+ else
+ {
+ DoneButton.IsEnabled = false;
+ }
+
if (pinnedAppCount > SumOfCheckedApp)
{
AppNameLabel.Text = UnpinnedAppName;
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>
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>
--- /dev/null
+[Unit]
+Description=This path will tell you that home is ready to launch
+
+[Path]
+PathExists=/run/.wm_ready
--- /dev/null
+[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'
--- /dev/null
+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