Modified list menu layout to fix issue.
authorHyerim Kim <rimi.kim@samsung.com>
Thu, 16 Mar 2017 11:09:26 +0000 (20:09 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:47 +0000 (18:34 +0900)
 - Button is displayed incorrectly when button is scaled.

Change-Id: I4f564d07e9ca9460f40d36c2c42b1974fe4fac71
Signed-off-by: Hyerim Kim <rimi.kim@samsung.com>
TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml
TVHome/TVHome/Controls/SubPanelAllAppsButton.xaml.cs
TVHome/TVHome/Controls/SubPanelButton.xaml
TVHome/TVHome/Controls/SubPanelReservedButton.xaml
TVHome/TVHome/Views/SubPanel.xaml

index 4ca050a..cd7b176 100755 (executable)
@@ -4,32 +4,32 @@
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelAllAppsButton">
   <RelativeLayout x:Name="ButtonBox"
-             HeightRequest="186"
-             WidthRequest="138"
+             HeightRequest="230"
+             WidthRequest="182"
              HorizontalOptions="Center">
     <Image x:Name="ButtonBgImage"
-           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=0.7419}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+           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_tizen_home_list_bg_normal.png" />
     <Image x:Name="ButtonImage"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=0.3116}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=0.3116}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=0.3768}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=0.3768}"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.3571428}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.2826}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.226087}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.2857}"
            Source="{Binding CurrentStateDescription.IconPath}" />
     <Image x:Name="ButtonDimmedImage"
-             RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=0}"
-             RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=0}"
-             RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=1}"
-             RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=1}"
+           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_tizen_home_list_dim_apps.png" />
     <Label x:Name="ButtonTitle"
-           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
-           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.8387}"
-           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1613}"
-           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+           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"
            FontSize="52"
index f9f8e5e..2799af7 100755 (executable)
@@ -44,7 +44,6 @@ namespace TVHome.Controls
 
         public override async void OnFocused(object sender, FocusEventArgs e)
         {
-            DebuggingUtils.Dbg(View.Width.ToString() + ", " + View.Height.ToString());
             if (OnFocusedCommand != null)
             {
                 OnFocusedCommand.Execute("");
index ac2cbdb..b1722cc 100755 (executable)
@@ -3,41 +3,41 @@
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelButton">
-    <RelativeLayout x:Name="ButtonBox"
-                 WidthRequest="138"
-                 HeightRequest="186"
-                 HorizontalOptions="Center">
-        <Image x:Name="ButtonImage"
-               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=0.7419}"
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-               Source="{Binding CurrentStateDescription.IconPath}" />
-      <Image x:Name="ButtonDimmedImage"
-               RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0}"
-               RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0}"
-               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=1}"
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=1}"
-               Source="img_tizen_home_list_dim_apps.png" />
-        <Label x:Name="ButtonTitle"
-               RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
-               RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.8387}"
-               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1613}"
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-               Opacity="0.6"
-               TextColor="White"
-               FontSize="52"
-               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>
+  <RelativeLayout x:Name="ButtonBox"
+               WidthRequest="182"
+               HeightRequest="230"
+               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_tizen_home_list_dim_apps.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"
+           FontSize="52"
+           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
index cc9e32d..b40730a 100755 (executable)
@@ -3,48 +3,47 @@
                       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                       xmlns:Controls="clr-namespace:TVHome.Controls"
                       x:Class="TVHome.Controls.SubPanelReservedButton">
-    <RelativeLayout x:Name = "ButtonBox"
-                 HeightRequest="186"
-                 WidthRequest="138"
-                 HorizontalOptions="Center">
-        <Image x:Name="ButtonBgImage"
-               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=0.7419}"
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-               Source="img_tizen_home_list_bg_white_normal.png"
-               />
-        <Image x:Name="ButtonImage"
-               RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=0.3116}"
-               RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=0.3116}"
-               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=0.3768}"
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=0.3768}"
-               Source="{Binding CurrentStateDescription.IconPath}" />
-      <Image x:Name="ButtonDimmedImage"
-               RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=0}"
-               RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=0}"
-               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Height, Factor=1}"
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBgImage, Property=Width, Factor=1}"
-               Source="img_tizen_home_list_dim_apps.png" />
-        <Label x:Name="ButtonTitle"
-               RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0}"
-               RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.8387}"
-               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.1613}"
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
-               Opacity="0.6"
-               TextColor="White"
-               FontSize="52"
-               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>
+  <RelativeLayout x:Name = "ButtonBox"
+               HeightRequest="230"
+               WidthRequest="182"
+               HorizontalOptions="Center">
+    <Image x:Name="ButtonBgImage"
+           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_tizen_home_list_bg_white_normal.png" />
+    <Image x:Name="ButtonImage"
+           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.3571428}"
+           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.2826}"
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=0.226087}"
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.2857}"
+           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_tizen_home_list_dim_apps.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"
+           FontSize="52"
+           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
index 2102ea6..5f6815c 100755 (executable)
@@ -3,13 +3,13 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
              xmlns:Views="clr-namespace:TVHome.Views"
              x:Class="TVHome.Views.SubPanel">
-    <ScrollView x:Name="PanelScrollView"
-                Orientation="Horizontal"
-                HorizontalOptions="Center">
-        <StackLayout x:Name="PanelButtonStack"
-                     Orientation="Horizontal"
-                     Padding="96,22,96,26"
-                     Spacing="78">
-        </StackLayout>
-    </ScrollView>
+  <ScrollView x:Name="PanelScrollView"
+              Orientation="Horizontal"
+              HorizontalOptions="Center">
+    <StackLayout x:Name="PanelButtonStack"
+                 Orientation="Horizontal"
+                 Padding="74,0,74,26"
+                 Spacing="34">
+    </StackLayout>
+  </ScrollView>
 </Views:Panel>
\ No newline at end of file