* limitations under the License.
*/
+using LibTVRefCommonPortable.Utils;
using System;
using System.Xml.Serialization;
+using Xamarin.Forms;
namespace LibTVRefCommonPortable.DataModels
{
public string AppID { get; set; }
[XmlIgnore]
+ public string Status { get; set; }
+
+ [XmlIgnore]
private bool isChecked;
[XmlIgnore]
public bool IsRemovable { get; set; }
[XmlIgnore]
- private bool isVisible = true;
-
- [XmlIgnore]
- public bool IsVisible
- {
- get
- {
- return isVisible;
- }
-
- set
- {
- if (isVisible != value)
- {
- isVisible = value;
- OnPropertyChanged("IsVisible");
- }
- }
- }
-
- [XmlIgnore]
private bool isFocused;
[XmlIgnore]
[XmlIgnore]
public DateTime LastUsed { get; set; }
+ [XmlIgnore]
+ public Command OptionMenuPinToggleCommand { get; set; }
+
+ [XmlIgnore]
+ public Command OptionMenuDeleteCommand { get; set; }
+
+ public AppShortcutInfo()
+ {
+ OptionMenuPinToggleCommand = new Command(() =>
+ {
+ MessagingCenter.Send<AppShortcutInfo, string>(this, "OptionMenuPinToggle", AppID);
+ });
+
+ OptionMenuDeleteCommand = new Command(() =>
+ {
+ MessagingCenter.Send<AppShortcutInfo, string>(this, "OptionMenuDelete", AppID);
+ });
+ }
+
public override void UpdateState()
{
SetCurrentState("default");
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TVApps.Controls.AppItemCell">
+
<RelativeLayout BackgroundColor="#000000"
HeightRequest="342"
WidthRequest="240">
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.6833}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2923}"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1583}"
- IsVisible="{Binding IsVisible}"
Source="{Binding CurrentStateDescription.IconPath}" />
<Image x:Name="DimImage"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=1}"
Opacity="0" />
</Grid>
- <Grid x:Name="OptionMenuArea"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4235}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.8666}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.0667}"
- >
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.RowSpacing>0</Grid.RowSpacing>
- <Button Grid.Row="0" Text="UNPIN" />
- <Button Grid.Row="1" Text="DELETE" />
- </Grid>
-
<!-- TODO: This BoxView is temporary code for Long Press test -->
<BoxView x:Name="ItemDim"
Color="Black"
Unfocused="OnUnFocused"
Clicked="OnClicked"
Opacity="0" />
+
+ <Grid x:Name="OptionMenuArea"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4235}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.8666}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.0667}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <Grid.RowSpacing>0</Grid.RowSpacing>
+ <Button x:Name="OptionMenuPinToggleButton"
+ Grid.Row="0"
+ Command="{Binding OptionMenuPinToggleCommand}"
+ Text="UNPIN" />
+ <Button x:Name="OptionMenuDeleteButton"
+ Grid.Row="1"
+ Command="{Binding OptionMenuDeleteCommand}"
+ Text="DELETE" />
+ </Grid>
+
</RelativeLayout>
</ViewCell>
* limitations under the License.
*/
-using LibTVRefCommonPortable.DataModels;
-using LibTVRefCommonPortable.Utils;
using System;
using System.ComponentModel;
-using System.Threading.Tasks;
+using System.Globalization;
using System.Windows.Input;
using Xamarin.Forms;
/// <summary>
/// hahaha
/// </summary>
+ public enum IconSize
+ {
+ Normal = 0,
+ Focused,
+ };
+
public partial class AppItemCell : ViewCell
- {
+ {
public ICommand OnClickedCommand { get; set; }
public ICommand OnFocusedCommand { get; set; }
public AppItemCell()
{
InitializeComponent();
+ OptionMenuPinToggleButton.Text = IsPinned ? "UNPIN" : "PIN";
+
PropertyChanged += AppItemCell_PropertyChanged;
ButtonTitle.PropertyChanged += ButtonTitle_PropertyChanged;
}
{
if (e.PropertyName.CompareTo("IsPinned") == 0)
{
- if (IsPinned)
- {
- PinnedIcon.FadeTo(0.99, 300);
- }
- else
- {
- PinnedIcon.FadeTo(0.0, 300);
- }
+ PinnedIcon.FadeTo((IsPinned) ? 0.99 : 0.0, 300);
+ OptionMenuPinToggleButton.Text = (IsPinned) ? "UNPIN" : "PIN";
return;
}
else if (e.PropertyName.CompareTo("IsChecked") == 0)
{
- if (IsChecked)
- {
- CheckImage.FadeTo(0.99, 300);
- DimImage.FadeTo(0.99, 300);
- DimImage.TranslateTo(0.0, 2.0, 300);
- DimImage.ScaleTo(1.32, 300);
- }
- else
- {
- // TODO : Change Animation (Add Pin Contents Item : Unselected)
- CheckImage.FadeTo(0.0, 300);
- DimImage.FadeTo(0.0, 300);
- DimImage.TranslateTo(0.0, 0.0, 300);
- DimImage.ScaleTo(0.0, 300);
- }
+ // TODO : Change Animation (Add Pin Contents Item : Unselected)
+ CheckImage.FadeTo((IsChecked) ? 0.99 : 0.0, 300);
+ DimImage.FadeTo((IsChecked) ? 0.99 : 0.0, 300);
+ DimImage.TranslateTo(0.0, (IsChecked) ? 2.0 : 0.0, 300);
+ DimImage.ScaleTo((IsChecked) ? 1.32 : 0.0, 300);
return;
}
else if (e.PropertyName.CompareTo("IsShowOptions") == 0)
{
- ChangeDefaultIconSize();
-
- if (IsShowOptions)
- {
- ButtonImage.TranslateTo(0, -90, 100);
- TextArea.TranslateTo(0, -90, 100);
- TextArea.FadeTo(0.0, 100);
- OptionMenuArea.TranslateTo(0, -144, 100);
- }
- else
- {
- ButtonImage.TranslateTo(0, 0, 100);
- TextArea.TranslateTo(0, 0, 100);
- TextArea.FadeTo(0.99, 100);
- OptionMenuArea.TranslateTo(0, 0, 100);
- }
+ ChangeIconSize(IconSize.Normal);
+ ShowOptionMenu(IsShowOptions);
}
else if (e.PropertyName.CompareTo("IsDim") == 0)
{
- if (IsDim)
- {
- ItemDim.FadeTo(0.5, 100);
- }
- else
- {
- ItemDim.FadeTo(0.0, 100);
- }
+ ItemDim.FadeTo((IsDim) ? 0.5 : 0.0, 100);
}
}
- public void ChangeDefaultIconSize()
- {
- ButtonImage.ScaleTo(1.0, 50);
- ButtonImage.TranslateTo(0.0, 0.0, 100);
- TextArea.TranslateTo(0.0, 0.0, 50);
- }
-
- public void ShowOptionMenu()
+ public void ChangeIconSize(IconSize size)
{
- ChangeDefaultIconSize();
-
- ButtonImage.TranslateTo(0, -90, 100);
- TextArea.TranslateTo(0, -90, 100);
- TextArea.FadeTo(0.0, 100);
- OptionMenuArea.TranslateTo(0, -144, 100);
+ ButtonImage.ScaleTo((size == IconSize.Normal) ? 1.0 : 1.32, 50);
+ ButtonImage.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : 2.0, 100);
+ TextArea.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : 26.0, 50);
}
- public void HideOptionMenu()
+ public void ShowOptionMenu(bool isShow)
{
- ChangeDefaultIconSize();
-
- ButtonImage.TranslateTo(0, 0, 100);
- TextArea.TranslateTo(0, 0, 100);
- TextArea.FadeTo(0.99, 100);
- OptionMenuArea.TranslateTo(0, 0, 100);
+ ButtonImage.TranslateTo(0, (isShow) ? -90 : 0, 100);
+ TextArea.TranslateTo(0, (isShow) ? -90 : 0, 100);
+ TextArea.FadeTo((isShow) ? 0.0 : 0.99, 100);
+ OptionMenuArea.TranslateTo(0, (isShow) ? -144 : 0, 100);
}
private void ButtonTitle_PropertyChanged(object sender, PropertyChangedEventArgs e)
OnPropertyChanged("IsFocused");
OnFocusedCommand?.Execute("");
- ButtonImage.ScaleTo(1.32, 300);
- ButtonImage.TranslateTo(0.0, 2.0, 300);
- TextArea.TranslateTo(0.0, 26.0, 300);
+
+ if (!IsShowOptions)
+ {
+ ChangeIconSize(IconSize.Focused);
+ }
if (IsChecked)
{
IsFocused = false;
OnPropertyChanged("IsFocused");
- ButtonImage.ScaleTo(1.0, 300);
- ButtonImage.TranslateTo(0.0, 0.0, 300);
- TextArea.TranslateTo(0.0, 0.0, 300);
+ if (!IsShowOptions)
+ {
+ ChangeIconSize(IconSize.Normal);
+ }
if (IsChecked)
{
}
private int AppCount;
- private ViewCell FocusedItem;
-
- public ViewCell GetFocusedItem()
- {
- return FocusedItem;
- }
public bool IsFirstItemFocused
{
viewCell.SetBinding(AppItemCell.IsDimProperty, new Binding("BindingContext.IsDim", source: viewCell.View));
viewCell.SetBinding(AppItemCell.IsFocusedProperty, new Binding("BindingContext.IsFocused", mode: BindingMode.TwoWay, source: viewCell.View));
viewCell.OnClickedCommand = new Command(() =>
-
{
item.DoAction();
});
var index = AppCount / 2;
viewCell.OnFocusedCommand = new Command(() =>
{
- FocusedItem = viewCell;
ScrollToIndex(index);
});
+
if (AppCount % 2 == 0)
{
AppUpperList.Children.Add(viewCell.View);
if (PinnedApps.ContainsKey(key))
{
- DebuggingUtils.Dbg("UnPin!");
+ DebuggingUtils.Dbg("UnPin! : " + selectedApp);
selectedApp.IsChecked = false;
selectedApp.IsPinned = false;
PinnedApps.Remove(key);
}
else
{
- DebuggingUtils.Dbg("Pin!");
+ DebuggingUtils.Dbg("Pin! : " + selectedApp);
selectedApp.IsChecked = true;
selectedApp.IsPinned = true;
PinnedApps.Add(key, key);
}
}
- private void DeleteApp(string AppID)
+ public void OptionMenuPinToggle(string key)
+ {
+ AppShortcutInfo SelectedApp = InstalledApps.FirstOrDefault(a => a.AppID.Equals(key));
+ if (SelectedApp == null)
+ {
+ DebuggingUtils.Err("Failed to get selected app : " + key);
+ return;
+ }
+
+ if (PinnedApps.ContainsKey(key))
+ {
+ DebuggingUtils.Dbg("Unpin : " + key);
+ SelectedApp.IsPinned = false;
+ PinnedApps.Remove(key);
+ }
+ else
+ {
+ DebuggingUtils.Dbg("Pin : " + key);
+ SelectedApp.IsPinned = true;
+ PinnedApps.Add(key, key);
+ }
+
+ this.UpdatePinnedApps();
+ ViewModel.ChangeCurrentStatus(AppsStatus.Default);
+ }
+
+ public void DeleteApp(string AppID)
{
DebuggingUtils.Dbg("Delete, " + AppID);
{
string tag = status.ToString().ToLower();
+ // TODO : remove this code. this code is temporary.
+ if (status == AppsStatus.LongPress)
+ {
+ AppShortcutInfo focuesedApp = InstalledApps.Find(a => a.IsFocused);
+ if (focuesedApp == null)
+ {
+ DebuggingUtils.Dbg("FocusedApp is not exist. Change app status to default");
+ ViewModel.ChangeCurrentStatus(AppsStatus.Default);
+ return;
+ }
+ }
+
DebuggingUtils.Dbg("AppsListStateUpdate, status = " + status.ToString() + ", tag = " + tag);
foreach (AppShortcutInfo item in InstalledApps)
{
}
}
- public Command OptionCommand { get; set; }
public Command ButtonDeleteCancelCommand { get; set; }
public Command ButtonPinAppCommand { get; set; }
public Command ButtonDeleteAppCommand { get; set; }
public Command ButtonPinOkCommand { get; set; }
public Command ButtonPinCancelCommand { get; set; }
- //This command is temporary for option menu test
- public Command SetLongPressCommand { get; set; }
- //This command is temporary for option menu test
- public Command UnSetLongPressCommand { get; set; }
-
public AppsStatus CurrentStatus { get; private set; }
private SortingOptions SortingOption
}
});
- SetLongPressCommand = new Command((appId) =>
- {
- ChangeCurrentStatus(AppsStatus.LongPress);
- });
-
- UnSetLongPressCommand = new Command((appId) =>
- {
- ChangeCurrentStatus(AppsStatus.Default);
- });
-
-
App.SetPinAppRequestListener((s, e) =>
{
// TODO : check concurrency
}
});
+
+ MessagingCenter.Subscribe<AppShortcutInfo, string>(this, "OptionMenuPinToggle", (sender, arg) =>
+ {
+ appsHolder.OptionMenuPinToggle(arg);
+ });
+
+ MessagingCenter.Subscribe<AppShortcutInfo, string>(this, "OptionMenuDelete", (sender, arg) =>
+ {
+ appsHolder.DeleteApp(arg);
+ });
+
DebuggingUtils.Dbg("<MainPageViewModel - End");
}
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="6385*" />
+ <ColumnDefinition Width="500*" />
+ <ColumnDefinition Width="5885*" />
<ColumnDefinition Width="3115*" />
<ColumnDefinition Width="500*" />
</Grid.ColumnDefinitions>
- <StackLayout Grid.Row="0" Grid.Column="1"
- Orientation="Horizontal">
+ <Label x:Name="FooterAdditionalText"
+ Grid.Row="0"
+ Grid.Column="1"
+ FontSize="56"
+ TextColor="White"
+ HorizontalTextAlignment="Start"
+ VerticalTextAlignment="Center"
+ Text="3 Pinned" />
+ <StackLayout Grid.Row="0" Grid.Column="2"
+ Orientation="Horizontal">
<Control:TVButton Text="OK"
Command="{Binding ButtonPinOkCommand}"/>
<Control:TVButton Text="CANCEL"
Command="{Binding ButtonPinCancelCommand}"/>
-
</StackLayout>
</Grid>
\ No newline at end of file
x:Class="TVApps.Views.MainPage"
BackgroundColor="#000000"
CurrentStatus="{Binding CurrentStatus}">
- <ContentPage.BindingContext>
- <ViewModels:MainPageViewModel />
- </ContentPage.BindingContext>
+ <ContentPage.BindingContext>
+ <ViewModels:MainPageViewModel />
+ </ContentPage.BindingContext>
- <ContentPage.Resources>
- <ResourceDictionary>
- <Style x:Key="titleText" TargetType="Label" >
- <Setter Property="FontSize" Value="187" />
- <Setter Property="TextColor" Value="#FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="backKeyInfoText" TargetType="Label" >
- <Setter Property="FontSize" Value="62" />
- <Setter Property="TextColor" Value="#99FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="buttonTextNormal" TargetType="Label" >
- <Setter Property="FontSize" Value="62" />
- <Setter Property="TextColor" Value="#F7F7F7" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="buttonTextPressed" TargetType="Label" >
- <Setter Property="FontSize" Value="62" />
- <Setter Property="TextColor" Value="#F7F7F708" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
- <Style x:Key="pinnedText" TargetType="Label" >
- <Setter Property="FontSize" Value="50" />
- <Setter Property="TextColor" Value="#F7F7F7" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
- </Style>
+ <ContentPage.Resources>
+ <ResourceDictionary>
+ <Style x:Key="titleText" TargetType="Label" >
+ <Setter Property="FontSize" Value="187" />
+ <Setter Property="TextColor" Value="#FFFFFF" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="backKeyInfoText" TargetType="Label" >
+ <Setter Property="FontSize" Value="62" />
+ <Setter Property="TextColor" Value="#99FFFFFF" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="buttonTextNormal" TargetType="Label" >
+ <Setter Property="FontSize" Value="62" />
+ <Setter Property="TextColor" Value="#F7F7F7" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="buttonTextPressed" TargetType="Label" >
+ <Setter Property="FontSize" Value="62" />
+ <Setter Property="TextColor" Value="#F7F7F708" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
+ <Style x:Key="pinnedText" TargetType="Label" >
+ <Setter Property="FontSize" Value="50" />
+ <Setter Property="TextColor" Value="#F7F7F7" />
+ <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ </Style>
- <Style x:Key="button" TargetType="Button">
- <Setter Property="BorderColor" Value="#FFFFFF"/>
- <Setter Property="HeightRequest" Value="40"/>
- <Setter Property="BorderWidth" Value="2" />
- <Setter Property="HorizontalOptions" Value="Center"/>
- <Setter Property="BackgroundColor" Value="Transparent"/>
- </Style>
- </ResourceDictionary>
- </ContentPage.Resources>
+ <Style x:Key="button" TargetType="Button">
+ <Setter Property="BorderColor" Value="#FFFFFF"/>
+ <Setter Property="HeightRequest" Value="40"/>
+ <Setter Property="BorderWidth" Value="2" />
+ <Setter Property="HorizontalOptions" Value="Center"/>
+ <Setter Property="BackgroundColor" Value="Transparent"/>
+ </Style>
+ </ResourceDictionary>
+ </ContentPage.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="95*" />
- <RowDefinition Height="329*" />
- <RowDefinition Height="52*" />
- <RowDefinition Height="64*" />
- </Grid.RowDefinitions>
- <Grid.RowSpacing>0</Grid.RowSpacing>
- <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="95*" />
+ <RowDefinition Height="329*" />
+ <RowDefinition Height="52*" />
+ <RowDefinition Height="64*" />
+ </Grid.RowDefinitions>
+ <Grid.RowSpacing>0</Grid.RowSpacing>
+ <Grid.ColumnSpacing>0</Grid.ColumnSpacing>
- <Label Grid.Row="0"
- Style="{StaticResource titleText}"
- HorizontalTextAlignment="Center"
- VerticalOptions="CenterAndExpand"
- HorizontalOptions="CenterAndExpand"
- Text="APPS" />
+ <Label Grid.Row="0"
+ Style="{StaticResource titleText}"
+ HorizontalTextAlignment="Center"
+ VerticalOptions="CenterAndExpand"
+ HorizontalOptions="CenterAndExpand"
+ Text="APPS" />
- <Grid Grid.Row="0">
- <Grid.RowDefinitions>
- <RowDefinition Height="37*" />
- <RowDefinition Height="34*" />
- <RowDefinition Height="29*" />
- </Grid.RowDefinitions>
+ <Grid Grid.Row="0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="37*" />
+ <RowDefinition Height="34*" />
+ <RowDefinition Height="29*" />
+ </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="891*" />
- <ColumnDefinition Width="58*" />
- <ColumnDefinition Width="50*" />
- </Grid.ColumnDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="891*" />
+ <ColumnDefinition Width="58*" />
+ <ColumnDefinition Width="50*" />
+ </Grid.ColumnDefinitions>
- <!-- TODO: This StackLayout is temporary code for Long Press test -->
- <Button Grid.Row="0" Grid.Column="1"
- Style="{StaticResource button}"
- Command="{Binding SetLongPressCommand}"
- CommandParameter="org.tizen.example.TVHome.TizenTV"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="FillAndExpand"/>
- <Button Grid.Row="2" Grid.Column="1"
- Style="{StaticResource button}"
- Command="{Binding UnSetLongPressCommand}"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="FillAndExpand"/>
-
- <StackLayout Grid.Row="1" Grid.Column="1"
- Grid.ColumnSpan="2"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="StartAndExpand"
- Orientation="Horizontal">
- <Image Source="ic_tizen_apps_additional_back.png"
- WidthRequest="40"
- HeightRequest="40"
- VerticalOptions="Center"/>
- <Label x:Name="BackKeyInfo"
- Style="{StaticResource backKeyInfoText}"
- Margin="6, 0, 0, 0"
- VerticalOptions="Center"
- HorizontalOptions="End"
- HorizontalTextAlignment="Start" />
- </StackLayout>
- </Grid>
+ <StackLayout Grid.Row="1" Grid.Column="1"
+ Grid.ColumnSpan="2"
+ VerticalOptions="FillAndExpand"
+ HorizontalOptions="StartAndExpand"
+ Orientation="Horizontal">
+ <Image Source="ic_tizen_apps_additional_back.png"
+ WidthRequest="40"
+ HeightRequest="40"
+ VerticalOptions="Center"/>
+ <Label x:Name="BackKeyInfo"
+ Style="{StaticResource backKeyInfoText}"
+ Margin="6, 0, 0, 0"
+ VerticalOptions="Center"
+ HorizontalOptions="End"
+ HorizontalTextAlignment="Start" />
+ </StackLayout>
+ </Grid>
- <Controls:AppListView x:Name="AppList"
- Grid.Row="1"
- ItemsSource="{Binding InstalledAppList}">
- <Controls:AppListView.ItemTemplate>
- <DataTemplate>
- <Controls:AppItemCell/>
- </DataTemplate>
- </Controls:AppListView.ItemTemplate>
- </Controls:AppListView>
+ <Controls:AppListView x:Name="AppList"
+ Grid.Row="1"
+ ItemsSource="{Binding InstalledAppList}">
+ <Controls:AppListView.ItemTemplate>
+ <DataTemplate>
+ <Controls:AppItemCell/>
+ </DataTemplate>
+ </Controls:AppListView.ItemTemplate>
+ </Controls:AppListView>
- <Views:FooterNormalStatus Grid.Row="3"
- x:Name="FooterNormal"
- IsVisible="true" />
+ <Views:FooterNormalStatus Grid.Row="3"
+ x:Name="FooterNormal"
+ IsVisible="true" />
- <Views:FooterPinStatus Grid.Row="3"
- x:Name="FooterPin"
- IsVisible="false" />
+ <Views:FooterPinStatus Grid.Row="3"
+ x:Name="FooterPin"
+ IsVisible="false" />
- <Views:FooterDeleteStatus Grid.Row="3"
- x:Name="FooterDelete"
- IsVisible="false" />
+ <Views:FooterDeleteStatus Grid.Row="3"
+ x:Name="FooterDelete"
+ IsVisible="false" />
- <BoxView x:Name="PageDimBox"
- Color="Black"
- Grid.Row="0"
- Grid.RowSpan="4"
- Grid.Column="0"
- Opacity="0.99"/>
- </Grid>
+ <BoxView x:Name="PageDimBox"
+ Color="Black"
+ Grid.Row="0"
+ Grid.RowSpan="4"
+ Grid.Column="0"
+ Opacity="0.99"/>
+ </Grid>
</ContentPage>
\ No newline at end of file
* limitations under the License.
*/
-using System;
using Xamarin.Forms;
using TVApps.ViewModels;
using LibTVRefCommonPortable.Utils;
using System.Threading;
using System.Threading.Tasks;
-using TVApps.Controls;
namespace TVApps.Views
{
{
DebuggingUtils.Dbg("[Apps] Menu key is pressed");
- if (CurrentStatus != AppsStatus.LongPress)
+ if (CurrentStatus == AppsStatus.Default)
{
MessagingCenter.Send<MainPage, string>(this, "ChangeCurrentStatus", AppsStatus.LongPress.ToString());
}