return Convert.ToInt32((double)((double)widthBaseSize / (double)BaseScreenWidth) * (double)(ScreenWidth));
}
+ public static double GetWidthSizeDouble(double widthBaseSize)
+ {
+ return (double)(widthBaseSize / (double)BaseScreenWidth) * (double)(ScreenWidth);
+ }
+
/// <summary>
/// A method provides a converted font size.
/// </summary>
xmlns:Controls="clr-namespace:TVHome.Controls"
x:Class="TVHome.Controls.SubPanelThumbnailButton">
<RelativeLayout x:Name="ButtonBox">
- <Image x:Name="ThumnailDimLayer"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
- Opacity="0.99"
- Source="img_tizen_home_list_dim_recent.png"/>
<Image x:Name="ThumbnailImage"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
FontFamily="BreezeSans"
Text="{Binding CurrentStateDescription.Label}"
TextColor="#FFFFFF"/>
+ <Image x:Name="ThumnailDimLayer"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
+ Aspect="Fill"
+ Opacity="0.99"
+ Source="img_tizen_home_list_dimmed_recent.png"/>
<Button x:Name="ButtonFocusArea"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
ThumbnailGradient.Source = "ic_list_thumbnail_gradient_focused.9.png";
ThumbnailTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Medium);
//ThumbnailTitle.FadeTo(0.8, 300);
- ThumnailDimLayer.FadeTo(0.0, 300);
#pragma warning restore CS4014
await View.ScaleTo(1.2, 300);
}
//ThumbnailTitle.FadeTo(0.3, 300);
ThumbnailGradient.Source = "ic_list_thumbnail_gradient_normal.9.png";
ThumbnailTitle.On<Xamarin.Forms.PlatformConfiguration.Tizen>().SetFontWeight(FontWeight.Normal);
- ThumnailDimLayer.FadeTo(0.99, 300);
#pragma warning restore CS4014
await View.ScaleTo(1.0, 300);
}
}
}
- public int SubThumbPanelSpacing
+ public double SubThumbPanelSpacing
{
get
{
// TODO : set proper size
- return SizeUtils.GetWidthSize(27);
+ return SizeUtils.GetWidthSizeDouble(27.5);
}
}
/// </summary>
private async void Iconified()
{
+ SubPanelDictionary[SelectedMenuName]?.ForceHidePanel();
#pragma warning disable CS4014
SubPanelDictionary[SelectedMenuName]?.TranslateTo(0.0, SizeUtils.GetHeightSize(100), 150);
SubPanelDictionary[SelectedMenuName]?.FadeTo(0,150);
using Xamarin.Forms;
using System.Threading.Tasks;
using LibTVRefCommonPortable.Utils;
+using System;
namespace TVHome.Views
{
{
}
+
+ public override void ForceHidePanel()
+ {
+ throw new NotImplementedException();
+ }
}
}
\ No newline at end of file
/// A method for handling to hide panel
/// </summary>
public abstract void HidePanel();
+ public abstract void ForceHidePanel();
/// <summary>
/// A method for handling to show panel
{
item.IsEnabled = true;
item.FindByName<Image>("ButtonDimmedImage").Opacity = 0.99;
- item.FindByName<Image>("ButtonDimmedImage").ScaleTo(1.0, 300);
+ //item.FindByName<Image>("ButtonDimmedImage").ScaleTo(1.0, 300);
}
this.TranslateTo(0, 0, 300);
ButtonViewList[index] = prevItemView;
ButtonViewList[prevIndex] = originItemView;
}
+
+ public override void ForceHidePanel()
+ {
+ foreach (var item in PanelButtonStack.Children)
+ {
+ item.FindByName<Image>("ButtonDimmedImage").Opacity = 0.99;
+ }
+ TranslationY = selectTransitionHeight;
+ Opacity = 1;
+ }
}
}
\ No newline at end of file
namespace TVHome.Views
{
+ using System;
using System.Threading;
using Tizen = Xamarin.Forms.PlatformConfiguration.Tizen;
/// <summary>
foreach (var item in PanelButtonStack.Children)
{
item.IsEnabled = true;
+ item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 1;
}
#pragma warning disable CS4014
this.TranslateTo(0, 0, 300);
}
OnFocusedCommand.Execute("");
-
+ foreach (var item in PanelButtonStack.Children)
+ {
+ item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 0;
+ }
isFocused = true;
var button = PanelButtonStack.Children[0];
button.FindByName<Button>("ButtonFocusArea").Focus();
this.TranslateTo(0, -selectTransitionHeight, 300);
#pragma warning restore CS4014
}
+
+ public override void ForceHidePanel()
+ {
+ foreach (var item in PanelButtonStack.Children)
+ {
+ item.IsEnabled = true;
+ item.FindByName<Xamarin.Forms.Image>("ThumnailDimLayer").Opacity = 1;
+ }
+ this.TranslationY = selectTransitionHeight;
+ Opacity = 1;
+ }
}
}
\ No newline at end of file