xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TVApps.Controls.AppItemCell">
- <RelativeLayout BackgroundColor="#000000"
- HeightRequest="793"
- WidthRequest="557">
- <Image x:Name="ButtonImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4795}"
- 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}"
- Source="{Binding CurrentStateDescription.IconPath}" />
- <Image x:Name="DimImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=1}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2923}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1583}"
- Source="img_tizen_apps_list_dimmed_check.png"
- Opacity="0"
- Scale="0" />
- <Image x:Name="CheckImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0.5853}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.5853}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.3918}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.3}"
- Source="ic_tizen_apps_launcher_pinmark.png"
- Opacity="0" />
- <Grid x:Name="TextArea"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1333}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8245}">
- <Grid.RowDefinitions>
- <RowDefinition Height="6*" />
- <RowDefinition Height="18*" />
- <RowDefinition Height="8*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="42" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="42" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowSpacing>0</Grid.RowSpacing>
- <Grid.ColumnSpacing>10</Grid.ColumnSpacing>
- <Image x:Name="PinnedIcon"
- Grid.Row="1"
- Grid.Column="1"
- Source="ic_tizen_apps_launcher_checkmark.png"
- Opacity="0"/>
- <Label x:Name="ButtonTitle"
- Grid.Row="0"
- Grid.RowSpan="3"
- Grid.Column="2"
- Opacity="1"
- FontSize="56"
- TextColor="White"
- LineBreakMode="TailTruncation"
- HorizontalTextAlignment="Center"
- Text="{Binding CurrentStateDescription.Label}" />
- <BoxView Grid.Row="1"
- Grid.Column="3"
+ <RelativeLayout
+ HeightRequest="793"
+ WidthRequest="557">
+ <Image x:Name="ButtonImage"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4795}"
+ 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}"
+ Source="{Binding CurrentStateDescription.IconPath}" />
+ <Image x:Name="DimImage"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2923}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1583}"
+ Source="img_tizen_apps_list_dimmed_check.png"
+ Opacity="0"
+ Scale="0" />
+ <Image x:Name="CheckImage"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0.5853}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.5853}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.3918}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.3}"
+ Source="ic_tizen_apps_launcher_pinmark.png"
Opacity="0" />
- </Grid>
+ <Grid x:Name="TextArea"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.0936}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8244}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="6*" />
+ <RowDefinition Height="18*" />
+ <RowDefinition Height="8*" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="42" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="42" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowSpacing>0</Grid.RowSpacing>
+ <Grid.ColumnSpacing>10</Grid.ColumnSpacing>
+ <Image x:Name="PinnedIcon"
+ Grid.Row="1"
+ Grid.Column="1"
+ Source="ic_tizen_apps_launcher_checkmark.png"
+ Opacity="0"/>
+ <Label x:Name="ButtonTitle"
+ Grid.Row="0"
+ Grid.RowSpan="3"
+ Grid.Column="2"
+ Opacity="1"
+ FontSize="56"
+ TextColor="White"
+ LineBreakMode="TailTruncation"
+ HorizontalTextAlignment="Center"
+ VerticalTextAlignment="End"
+ Text="{Binding CurrentStateDescription.Label}" />
+ <BoxView Grid.Row="1"
+ Grid.Column="3"
+ Opacity="0" />
+ </Grid>
- <!-- TODO: This BoxView is temporary code for Long Press test -->
- <BoxView x:Name="ItemDim"
- Color="Black"
- Opacity="0.0"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}" />
+ <!-- TODO: This BoxView is temporary code for Long Press test -->
+ <BoxView x:Name="ItemDim"
+ Color="Black"
+ Opacity="0.0"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.7369}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2631}"/>
- <Button x:Name = "ButtonFocusArea"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
- Focused="OnFocused"
- Unfocused="OnUnFocused"
- Clicked="OnClicked"
- Opacity="0" />
+ <Button x:Name = "ButtonFocusArea"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+ Focused="OnFocused"
+ 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>
+ <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>
+ </RelativeLayout>
</ViewCell>
namespace TVApps.Controls
{
- /// <summary>
- /// hahaha
- /// </summary>
public enum IconSize
{
Normal = 0,
Focused,
};
+ /// <summary>
+ /// Custom Control for Apps List Item Template
+ /// </summary>
public partial class AppItemCell : ViewCell
{
public ICommand OnClickedCommand { get; set; }
// 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.TranslateTo(0.0, (IsChecked) ? 4.64 : 0.0, 300);
DimImage.ScaleTo((IsChecked) ? 1.32 : 0.0, 300);
return;
public void ChangeIconSize(IconSize size)
{
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);
+ ButtonImage.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : 4.64, 100);
+ TextArea.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : 64.93, 50);
}
public void ShowOptionMenu(bool isShow)
{
- ButtonImage.TranslateTo(0, (isShow) ? -90 : 0, 100);
- TextArea.TranslateTo(0, (isShow) ? -90 : 0, 100);
+ ButtonImage.TranslateTo(0, (isShow) ? -208.7 : 0, 100);
+ TextArea.TranslateTo(0, (isShow) ? -208.7 : 0, 100);
TextArea.FadeTo((isShow) ? 0.0 : 0.99, 100);
- OptionMenuArea.TranslateTo(0, (isShow) ? -144 : 0, 100);
+ OptionMenuArea.TranslateTo(0, (isShow) ? -333.91 : 0, 100);
}
private void ButtonTitle_PropertyChanged(object sender, PropertyChangedEventArgs e)
if (IsChecked)
{
DimImage.ScaleTo(1.32, 300);
- DimImage.TranslateTo(0.0, 2.0, 300);
- CheckImage.TranslateTo(0.0, 2.0, 300);
+ DimImage.TranslateTo(0.0, 4.64, 300);
+ CheckImage.TranslateTo(0.0, 4.64, 300);
}
}