Modify RecentApp subpanel layout
authorgs86.lee <gs86.lee@DO-GS86-LEE04>
Mon, 27 Feb 2017 10:31:16 +0000 (19:31 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:44 +0000 (18:34 +0900)
Change-Id: I720386191ae2ae403a516bb313a8ea24f799a653

TVHome/TVHome.TizenTV/res/AppIcon.png [new file with mode: 0644]
TVHome/TVHome.TizenTV/res/screenshot.png [new file with mode: 0644]
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml
TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml.cs

diff --git a/TVHome/TVHome.TizenTV/res/AppIcon.png b/TVHome/TVHome.TizenTV/res/AppIcon.png
new file mode 100644 (file)
index 0000000..9765b1b
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/AppIcon.png differ
diff --git a/TVHome/TVHome.TizenTV/res/screenshot.png b/TVHome/TVHome.TizenTV/res/screenshot.png
new file mode 100644 (file)
index 0000000..9aa8939
Binary files /dev/null and b/TVHome/TVHome.TizenTV/res/screenshot.png differ
index ec7daf20c81ab705bb787651154e844580dda432..1ca5b60c437adadec857c61118a18b5dc525984d 100644 (file)
@@ -3,31 +3,39 @@
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           x:Class="TVHome.Controls.SubPanelThumbnailButton">
   <RelativeLayout Opacity="0.3">
-    <BoxView x:Name = "ButtonBox"
-             RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
-             RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
+    <BoxView x:Name="ButtonBox"
+             WidthRequest="320"
+             HeightRequest="180"
              Color="Blue" />
-    <Image x:Name="ButtonImage"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
-           Source="{Binding CurrentStateDescription.IconPath}" />
-    <Image x:Name="ButtonIcon"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0.4}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.4}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0.6}"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.6}"
+    <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}"
+           Source="screenshot.png" />
+    <Image x:Name="ThumbnailGradient"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
+           Source="ic_tizen_list_thumbnail_gradient_normal.9.png" />
+    <Image x:Name="ThumbnailIcon"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.043}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.689}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.131}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.233}"
            Source="AppIcon.png" />
-    <Label x:Name="ButtonTitle"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.8}"
+    <Label x:Name="ThumbnailTitle"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.206}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.722}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.75}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.166}"
            Opacity="0"
            LineBreakMode="TailTruncation"
-           HorizontalTextAlignment="Center"
-           Text="{Binding CurrentStateDescription.Label}" />
-    <Button x:Name = "ButtonFocusArea"
-            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
-            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.94}"
+           HorizontalTextAlignment="Start"
+           VerticalTextAlignment="Center"
+           Text="{Binding CurrentStateDescription.Label}"
+           TextColor="#FFFFFFFF"
+           FontSize="70"/>
+    <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}"
             Focused="OnFocused"
             Unfocused="OnUnfocused"
             Clicked="OnClicked"
index ddb83a0270ef7aaf042a29a687ebbdf0f0d35de9..bcd163b249fc39710d324b05fd75ce9830b36ddc 100644 (file)
@@ -26,7 +26,7 @@ namespace TVHome.Controls
     /// </summary>
     public partial class SubPanelThumbnailButton : ViewCell
     {
-        public BindableProperty OnFocusedCommandProperty = BindableProperty.Create("OnFocusedCommand", typeof(ICommand), typeof(SubPanelButton));
+        public BindableProperty OnFocusedCommandProperty = BindableProperty.Create("OnFocusedCommand", typeof(ICommand), typeof(SubPanelThumbnailButton));
 
         public ICommand OnFocusedCommand
         {
@@ -34,7 +34,7 @@ namespace TVHome.Controls
             set { SetValue(OnFocusedCommandProperty, value); }
         }
 
-        public BindableProperty OnClickedCommandProperty = BindableProperty.Create("OnClickedCommand", typeof(ICommand), typeof(SubPanelButton));
+        public BindableProperty OnClickedCommandProperty = BindableProperty.Create("OnClickedCommand", typeof(ICommand), typeof(SubPanelThumbnailButton));
 
         public ICommand OnClickedCommand
         {
@@ -54,13 +54,13 @@ namespace TVHome.Controls
                 OnFocusedCommand.Execute("");
             }
 
-            ButtonTitle.FadeTo(0.99, 300);
+            ThumbnailTitle.FadeTo(0.99, 300);
             await View.FadeTo(0.6, 300);
         }
 
         private async void OnUnfocused(object sender, FocusEventArgs e)
         {
-            ButtonTitle.FadeTo(0, 300);
+            ThumbnailTitle.FadeTo(0, 300);
             await View.FadeTo(0.3, 300);
         }