+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using LibTVRefCommonTizen.Ports;
-using System;
-
-using TVApps.Controls;
-using TVApps.TizenTV.Renderer;
-using Xamarin.Forms.Platform.Tizen;
-
-[assembly: ExportRenderer(typeof(CustomButton), typeof(CustomButtonRenderer))]
-namespace TVApps.TizenTV.Renderer
-{
- /// <summary>
- /// A custom renderer for CustomButton
- /// </summary>
- /// <see cref="CustomButton"/>
- class CustomButtonRenderer : ButtonRenderer//ViewRenderer<Xamarin.Forms.Button, Button>
- {
- /// <summary>
- /// Register touch event callback for the Tap.
- /// </summary>
- /// <param name="args"> A button element changed event's argument </param>
- protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Button> args)
- {
- base.OnElementChanged(args);
-
- if (Control == null ||
- Element == null)
- {
- return;
- }
-
- if (args.NewElement == null)
- {
- return;
- }
-
- Control.Pressed += KeyDown;
- Control.Released += KeyUp;
- }
-
- /// <summary>
- /// A action delegate invokes OnButtonUp event
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when Control(Native Button) is pressed</param>
- private void KeyUp(object sender, EventArgs e)
- {
- DbgPort.D("KeyUp");
- CustomButton BtnElement = Element as CustomButton;
- BtnElement.OnButtonUp.Invoke(sender, e);
- }
-
- /// <summary>
- /// A action delegate invokes OnButtonDown event
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when Control(Native Button) is released</param>
- private void KeyDown(object sender, EventArgs e)
- {
- DbgPort.D("KeyDown");
- CustomButton BtnElement = Element as CustomButton;
- BtnElement.OnButtonDown.Invoke(sender, e);
- }
- }
-}
<None Include="shared\res\xaapps.png" />
</ItemGroup>
<ItemGroup>
- <Compile Include="Renderer\CustomButtonRenderer.cs" />
<Compile Include="Renderer\NinePatchImageRenderer.cs" />
<Compile Include="TVApps.TizenTV.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
LineBreakMode="TailTruncation"
HorizontalTextAlignment="Center"
VerticalTextAlignment="End"
+ FontFamily="BreezeSans"
Text="{Binding CurrentStateDescription.Label}" />
<BoxView Grid.Row="1"
Grid.Column="3"
using System.ComponentModel;
using System.Windows.Input;
using Xamarin.Forms;
+using Xamarin.Forms.PlatformConfiguration.TizenSpecific;
namespace TVApps.Controls
{
+ using Tizen = Xamarin.Forms.PlatformConfiguration.Tizen;
/// <summary>
/// A enumeration for AppItemCell icon size
/// </summary>
OnPropertyChanged("IsFocused");
OnFocusedCommand?.Execute("");
+ ButtonTitle.On<Tizen>().SetFontWeight(FontWeight.Medium);
if (IsChecked)
{
{
IsFocused = false;
OnPropertyChanged("IsFocused");
+ ButtonTitle.On<Tizen>().SetFontWeight(FontWeight.Normal);
if (!IsShowOptions)
{
+++ /dev/null
-<?xml version="1.0" encoding="utf-8" ?>
-<Button xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- x:Class="TVApps.Controls.CustomButton">
-</Button>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-
-using Xamarin.Forms;
-
-namespace TVApps.Controls
-{
- /// <summary>
- /// A custom control for TVButton to get pressed/release status
- /// </summary>
- public partial class CustomButton : Button
- {
- /// <summary>
- /// A event handler for button released event
- /// </summary>
- public EventHandler OnButtonUp;
-
- /// <summary>
- /// A event handler for button pressed event
- /// </summary>
- public EventHandler OnButtonDown;
-
- /// <summary>
- /// A constructor
- /// </summary>
- public CustomButton()
- {
- InitializeComponent();
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8" ?>
-<StackLayout xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:Controls="clr-namespace:TVApps.Controls"
- x:Class="TVApps.Controls.TVButton">
-
- <Grid x:Name="ButtonGrid"
- BackgroundColor="#000000FF"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="FillAndExpand">
-
- <Label Grid.Row="0" Grid.Column="0"
- x:Name="TitleText"
- FontSize="{Binding RegularFontSize}"
- HorizontalOptions="Center"
- VerticalOptions="Center"
- FontFamily="Breeze Sans Regular"
- TextColor="#F7F7F7"/>
-
- <Controls:NinePatchImage Grid.Row="0" Grid.Column="0"
- x:Name="BackgroundImage"
- VerticalOptions="CenterAndExpand"
- HorizontalOptions="CenterAndExpand"
- Aspect="Fill"
- BorderLeft="20"
- BorderTop="20"
- BorderRight="20"
- BorderBottom="20"
- Source="btn_tizen_dropdown_line_normal.9.png"/>
-
- <Controls:CustomButton Grid.Row="0" Grid.Column="0"
- x:Name="HiddenButton"
- VerticalOptions="FillAndExpand"
- HorizontalOptions="FillAndExpand"
- Opacity="0" />
- </Grid>
-</StackLayout>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using LibTVRefCommonPortable.Utils;
-using System;
-using System.Windows.Input;
-using Xamarin.Forms;
-
-namespace TVApps.Controls
-{
- /// <summary>
- /// A custom control for buttons in footer of TV Apps
- /// </summary>
- public partial class TVButton : StackLayout
- {
- /// <summary>
- /// Gets or sets text of TVButton
- /// </summary>
- public string Text
- {
- get { return TitleText.Text; }
- set { TitleText.Text = value; }
- }
-
- public event EventHandler Clicked;
-
- /// <summary>
- /// Identifies the Command bindable property
- /// </summary>
- public static readonly BindableProperty CommandProperty = BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(TVButton), null, BindingMode.TwoWay);
-
- /// <summary>
- /// Gets or sets command of TV Button
- /// The command will be executed if the button is touched
- /// </summary>
- public ICommand Command
- {
- get { return (ICommand)GetValue(CommandProperty); }
- set { SetValue(CommandProperty, value); }
- }
-
- /// <summary>
- /// A command parameter will be passed when the Command is executed
- /// </summary>
- /// <see cref="CommandButton.Command"/>
- public string CommandParameter
- {
- get;
- set;
- }
-
-
- /// <summary>
- /// The image path for button is pressed
- /// </summary>
- private static readonly string ButtonImagePressed = "btn_tizen_dropdown_line_dimmed.9.png";
-
- /// <summary>
- /// The image path for button is released
- /// </summary>
- private static readonly string ButtonImageReleased = "btn_tizen_dropdown_line_normal.9.png";
-
- /// <summary>
- /// Constructor
- /// </summary>
- public TVButton()
- {
- InitializeComponent();
-
- WidthRequest = SizeUtils.GetWidthSize(300);
- HeightRequest = SizeUtils.GetHeightSize(80);
-
- HiddenButton.Clicked += ButtonClickListener;
- HiddenButton.Focused += ButtonFocusedListener;
- HiddenButton.Unfocused += ButtonUnfocusedListener;
- HiddenButton.OnButtonUp += ButtonUpListener;
- HiddenButton.OnButtonDown += ButtonDownListener;
- }
-
- /// <summary>
- /// This method is called when the TVButton is clicked
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when button is clicked</param>
- private void ButtonClickListener(object sender, EventArgs e)
- {
- // Stops playing animation
- ButtonGrid.AbortAnimation("ColorChange");
-
- // Starts animation that change Focused Color to Selected Color
- ButtonGrid.Animate("ColorChange", v =>
- {
- var gridColorR = (int)(255 * (1 - v));
- var gridColorG = (int)(255 - 126 * v);
- var gridColorB = (int)(255 - 57 * v);
- ButtonGrid.BackgroundColor = Color.FromRgb(gridColorR, gridColorG, gridColorB);
- },
- length: 100,
- finished: (a, b) =>
- {
- // Starts animation that change Selected Color to Focused Color
- ButtonGrid.Animate("ColorChange", v =>
- {
- var gridColorR = (int)(255 * v);
- var gridColorG = (int)(129 + 126 * v);
- var gridColorB = (int)(198 + 57 * v);
- ButtonGrid.BackgroundColor = Color.FromRgb(gridColorR, gridColorG, gridColorB);
- },
- length: 50,
- finished: (c, d) =>
- {
- ButtonGrid.BackgroundColor = Color.FromRgb(255, 255, 255);
- Command?.Execute(CommandParameter);
- Clicked?.Invoke(sender, e);
- });
- });
- }
-
- /// <summary>
- /// This method is called when the TVButton receives focus
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when button is focused</param>
- private void ButtonFocusedListener(object sender, FocusEventArgs e)
- {
- // Stops playing animation
- ButtonGrid.AbortAnimation("ColorChange");
-
- // Starts animation that change Unfocused Color to Focused Color
- ButtonGrid.Animate("ColorChange", v =>
- {
- var gridColor = (int)(255 * v);
- var textColor = (int)(255 * (1 - v));
- ButtonGrid.BackgroundColor = Color.FromRgb(gridColor, gridColor, gridColor);
- TitleText.TextColor = Color.FromRgb(textColor, textColor, textColor);
- },
- length: 150);
- }
-
- /// <summary>
- /// This method is called when the TVButton loses focus
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when button is unfocused</param>
- private void ButtonUnfocusedListener(object sender, FocusEventArgs e)
- {
- // Stops playing animation
- ButtonGrid.AbortAnimation("ColorChange");
-
- // Starts animation that change Focused Color to Unfocused Color
- ButtonGrid.Animate("ColorChange", v =>
- {
- var gridColor = (int)(255 * (1 - v));
- var textColor = (int)(255 * v);
- ButtonGrid.BackgroundColor = Color.FromRgb(gridColor, gridColor, gridColor);
- TitleText.TextColor = Color.FromRgb(textColor, textColor, textColor);
- },
- length: 150);
- }
-
- /// <summary>
- /// This method is called when the TVButton is released
- /// </summary>
- /// <param name="sender">The event sender</param>
- /// <param name="e">The event that is occurred when button is released</param>
- public void ButtonUpListener(object sender, EventArgs e)
- {
- BackgroundImage.Source = ButtonImageReleased;
- Command?.Execute(CommandParameter);
- }
-
- /// <summary>
- /// This method is called when the TVButton is pressed
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when button is pressed</param>
- public void ButtonDownListener(object sender, EventArgs e)
- {
- BackgroundImage.Source = ButtonImagePressed;
- }
-
- /// <summary>
- /// A method positions and sizes the children
- /// </summary>
- /// <param name="x">The x position for the children</param>
- /// <param name="y">The y position for the children</param>
- /// <param name="width">The width for the children</param>
- /// <param name="height">The height for the children</param>
- protected override void LayoutChildren(double x, double y, double width, double height)
- {
- base.LayoutChildren(x, y, width, height);
-
- BackgroundImage.HeightRequest = height;
- BackgroundImage.WidthRequest = width;
- }
- }
-}
<Compile Include="Controls\AppListView.xaml.cs">
<DependentUpon>AppListView.xaml</DependentUpon>
</Compile>
- <Compile Include="Controls\CustomButton.xaml.cs">
- <DependentUpon>CustomButton.xaml</DependentUpon>
- </Compile>
<Compile Include="Controls\NinePatchImage.xaml.cs">
<DependentUpon>NinePatchImage.xaml</DependentUpon>
</Compile>
- <Compile Include="Controls\TVButton.xaml.cs">
- <DependentUpon>TVButton.xaml</DependentUpon>
- </Compile>
<Compile Include="TVApps.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ViewModels\AppsHolder.cs" />
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="Controls\TVButton.xaml">
- <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
<EmbeddedResource Include="Views\FooterDeleteStatus.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="Controls\CustomButton.xaml">
- <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
<ProjectReference Include="..\..\LibTVRefCommonPortable\LibTVRefCommonPortable.csproj">
<Project>{67f9d3a8-f71e-4428-913f-c37ae82cdb24}</Project>
<Name>LibTVRefCommonPortable</Name>
<ResourceDictionary>
<Style x:Key="titleText" TargetType="Label" >
<Setter Property="TextColor" Value="#FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ <Setter Property="FontFamily" Value="BreezeSans" />
</Style>
<Style x:Key="backKeyInfoText" TargetType="Label" >
<Setter Property="TextColor" Value="#FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Regular" />
+ <Setter Property="FontFamily" Value="BreezeSans" />
<Setter Property="Opacity" Value="0.08" />
</Style>
<Style x:Key="AddionalInfoTextMedium" TargetType="Label" >
<Setter Property="TextColor" Value="#FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Bold" />
+ <Setter Property="FontFamily" Value="BreezeSans" />
<Setter Property="Opacity" Value="0.7" />
</Style>
<Style x:Key="AddionalInfoTextLight" TargetType="Label" >
<Setter Property="TextColor" Value="#FFFFFF" />
- <Setter Property="FontFamily" Value="Breeze Sans Light" />
+ <Setter Property="FontFamily" Value="BreezeSans" />
<Setter Property="Opacity" Value="0.7" />
</Style>
</ResourceDictionary>
HorizontalTextAlignment="Center"
VerticalOptions="CenterAndExpand"
FontSize="{Binding AddtionalInfoTextSize}" />
- <Label Text="is"
+ <Label x:Name="AdditionalInfoIs" Text="is"
Style="{StaticResource AddionalInfoTextLight}"
HorizontalTextAlignment="Center"
VerticalOptions="CenterAndExpand"
AdditionalInfoText1.FontSize = SizeUtils.GetFontSize(32);
AdditionalInfoText2.FontSize = SizeUtils.GetFontSize(32);
+ TitleLabel.On<Tizen>().SetFontWeight(FontWeight.Normal);
+ BackKeyInfo.On<Tizen>().SetFontWeight(FontWeight.Normal);
+ AdditionalInfoIs.On<Tizen>().SetFontWeight(FontWeight.Light);
+
PropertyChanged += MainPagePropertyChanged;
SetCurrentStatus(AppsStatus.Default);
{
AddtionalInfo.IsVisible = true;
TitleLabel.IsVisible = false;
+ AdditionalInfoText1.On<Tizen>().SetFontWeight(FontWeight.Medium);
+ AdditionalInfoText2.On<Tizen>().SetFontWeight(FontWeight.Light);
+ AdditionalInfoIs.On<Tizen>().SetFontWeight(FontWeight.Light);
if (pinnedAppCount > SumOfCheckedApp)
{
AdditionalInfoText1.Text = UnpinnedAppName;
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<Controls:PanelButton xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:Controls="clr-namespace:TVHome.Controls"
- x:Class="TVHome.Controls.SubPanelReservedButton">
- <RelativeLayout x:Name = "ButtonBox"
- HorizontalOptions="Center">
- <Image x:Name="ButtonImage"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
- Source="{Binding CurrentStateDescription.IconPath}" />
- <Image x:Name="ButtonDimmedImage"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.095652}"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.6}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75824}"
- Source="img_home_list_dimmed_apps_75.png" />
- <Label x:Name="ButtonTitle"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.120879}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.77391}"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1303478}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.758241}"
- Opacity="0.6"
- TextColor="White"
- FontFamily="BreezeSans"
- LineBreakMode="TailTruncation"
- HorizontalTextAlignment="Center"
- Text="{Binding CurrentStateDescription.Label}" />
- <Button x:Name = "ButtonFocusArea"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0}"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
- Focused="OnFocused"
- Unfocused="OnUnfocused"
- Clicked="OnClicked"
- Opacity="0" />
- </RelativeLayout>
-</Controls:PanelButton>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Windows.Input;
-using LibTVRefCommonPortable.Utils;
-using Xamarin.Forms;
-using Xamarin.Forms.PlatformConfiguration.TizenSpecific;
-
-namespace TVHome.Controls
-{
- /// <summary>
- /// Custom Control for Button in Sub Panel
- /// </summary>
- public partial class SubPanelReservedButton : PanelButton
- {
- /// <summary>
- /// SubPanel icon's transition height value when it focused.
- /// </summary>
- private int selectTransitionHeight = SizeUtils.GetHeightSize(22);
-
- /// <summary>
- /// Constructor
- /// </summary>
- public SubPanelReservedButton()
- {
- InitializeComponent();
-
- ButtonBox.WidthRequest = SizeUtils.GetWidthSize(182);
- ButtonBox.HeightRequest = SizeUtils.GetHeightSize(230);
- ButtonTitle.FontSize = SizeUtils.GetFontSize(26);
- ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
- }
-
- /// <summary>
- /// Handles Button Clicked event
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when button is clicked</param>
- public override async void OnClicked(object sender, EventArgs e)
- {
- if (OnClickedCommand != null)
- {
- OnClickedCommand.Execute("");
- }
-
- await View.FadeTo(0.99, 300);
- }
-
- /// <summary>
- /// Handles Button Focused event
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when button is focused</param>
- public override async void OnFocused(object sender, FocusEventArgs e)
- {
- if (OnFocusedCommand != null)
- {
- OnFocusedCommand.Execute("");
- }
-
-#pragma warning disable CS4014
- ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
- ButtonTitle.FadeTo(0.99, 300);
- ButtonTitle.TranslateTo(0, selectTransitionHeight, 300);
-#pragma warning restore CS4014
- await ButtonImage.ScaleTo(1.3, 300);
- }
-
- /// <summary>
- /// Handles Button Unfocused event
- /// </summary>
- /// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occurred when button is unfocused</param>
- public override async void OnUnfocused(object sender, FocusEventArgs e)
- {
-#pragma warning disable CS4014
- ButtonTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
- ButtonTitle.FadeTo(0.5, 300);
- ButtonTitle.TranslateTo(0, 0, 300);
-#pragma warning restore CS4014
- await ButtonImage.ScaleTo(1, 300);
- }
-
- /// <summary>
- /// A method for handling the button when button is changed to move mode
- /// </summary>
- /// <param name="isMoveMode">A flag indicates whether the button is move mode or not</param>
- /// <param name="isDefault">A flag indicates whether this method is called by ChangeToDefaultMode method</param>
- public override void ChangeMoveMode(bool isMoveMode, bool isDefault)
- {
-
- }
-
- /// <summary>
- /// A method for changing the button's LayoutOptions according to parameter
- /// </summary>
- /// <param name="isMoveMode">A flag indicates whether the SubPanel is MoveMode or not</param>
- public override void ChangeLayoutOptions(bool isMoveMode)
- {
- if (isMoveMode)
- {
- View.VerticalOptions = LayoutOptions.End;
- }
- else
- {
- View.VerticalOptions = LayoutOptions.Start;
- }
-
- View.TranslateTo(0, 0, 0);
- }
-
- /// <summary>
- /// A method for showing Context popup
- /// </summary>
- public override void ShowContextPopup()
- {
- }
- }
-}
\ No newline at end of file
<Compile Include="Controls\SubPanelAllAppsButton.xaml.cs">
<DependentUpon>SubPanelAllAppsButton.xaml</DependentUpon>
</Compile>
- <Compile Include="Controls\SubPanelReservedButton.xaml.cs">
- <DependentUpon>SubPanelReservedButton.xaml</DependentUpon>
- </Compile>
<Compile Include="Controls\SubPanelButton.xaml.cs">
<DependentUpon>SubPanelButton.xaml</DependentUpon>
</Compile>
if (item is AppShortcutInfo)
{
if (item.StateDescriptions["default"].Label.Equals("All apps")
- || item.StateDescriptions["default"].Label.Equals("Add pin"))
+ || item.StateDescriptions["default"].Label.Equals("Add pin")
+ || item.StateDescriptions["default"].Label.Equals("Media Hub"))
{
button = new SubPanelAllAppsButton();
ButtonList.Add(button);
}
- else if (item.StateDescriptions["default"].Label.Equals("Media Hub"))
- {
- button = new SubPanelReservedButton();
- ButtonList.Add(button);
- }
else
{
button = new SubPanelButton();
BorderBottom="2"
BorderLeft="2"
BorderRight="2"/>
- <Label x:Name="Text"
+ <Label x:Name="NoContentInfoText"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=NoContentInfo ,Property=Height, Factor=0.3}"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=NoContentInfo ,Property=Width, Factor=0.354167}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=NoContentInfo ,Property=Height, Factor=0.181818}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
Text="No Content to display"
+ FontFamily="BreezeSans"
FontSize="{Binding NoContentInformationFontSize}"
TextColor="White" />
</RelativeLayout>
using Tizen.Xamarin.Forms.Extension;
using LibTVRefCommonPortable.Utils;
using System.Collections.Generic;
+using Xamarin.Forms.PlatformConfiguration.TizenSpecific;
namespace TVHome.Views
{
+ using Tizen = Xamarin.Forms.PlatformConfiguration.Tizen;
/// <summary>
/// SubThumnailPanel in Main Page for Recent
/// </summary>
InitializeComponent();
isFocused = false;
PropertyChanged += OnItemsSourcePropertyChanged;
+ NoContentInfoText.On<Tizen>().SetFontWeight(FontWeight.Light);
ButtonList = new List<PanelButton>();