Change MainPanel button image
authorgs86.lee <gs86.lee@DO-GS86-LEE04>
Thu, 23 Feb 2017 08:48:32 +0000 (17:48 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:44 +0000 (18:34 +0900)
Change-Id: I37b153aaa9c313d87599418030d9650ec8923144

TVHome/TVHome/Controls/MainPanelButton.xaml
TVHome/TVHome/ViewModels/MainPageViewModel.cs

index 4bdea818ec6706adfd4f7455b26bd57a384efd49..41f4f9717ae76fbb349a6aa12865fffd255abb25 100644 (file)
@@ -2,22 +2,21 @@
 <ViewCell xmlns="http://xamarin.com/schemas/2014/forms"\r
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"\r
           x:Class="TVHome.Controls.MainPanelButton">\r
-    <RelativeLayout Opacity="0.3">\r
-        <BoxView x:Name = "ButtonBox"\r
-                 RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
-                 RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
-                 Color="Red" />\r
-        <Label x:Name ="ButtonTitle"\r
-               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
-               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
-               Text="{Binding CurrentStateDescription.Label}"\r
-               LineBreakMode="TailTruncation" />\r
-        <Button x:Name = "ButtonFocusArea"\r
-                RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
-                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
-                Focused="OnFocused"\r
-                Unfocused="OnUnfocused"\r
-                Clicked="OnClicked"\r
-                Opacity="0" />\r
-    </RelativeLayout>\r
+  <RelativeLayout Opacity="0.3">\r
+    <BoxView x:Name = "ButtonBox"\r
+             RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
+             RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
+             Color="Red" />\r
+    <Image x:Name="ButtonImage"\r
+           RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
+           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}" \r
+           Source="{Binding CurrentStateDescription.IconPath}"/>\r
+    <Button x:Name = "ButtonFocusArea"\r
+            RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
+            RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"\r
+            Focused="OnFocused"\r
+            Unfocused="OnUnfocused"\r
+            Clicked="OnClicked"\r
+            Opacity="0" />\r
+  </RelativeLayout>\r
 </ViewCell>
\ No newline at end of file
index aead3f891c8bbb3f6908baa30c2d1d6f1ad6073d..9e40221f28d5a02be9aa6bd0cfeb7a98fc7e6efc 100644 (file)
@@ -46,6 +46,7 @@ namespace TVHome.ViewModels
         {\r
             string[] AppName = { "Recent", "Apps", "Settings" };\r
             string[] AppControlID = { "org.tizen.settings", "org.tizen.apps", "org.tizen.settings" };\r
+            string[] AppIconPath = { "recent_normal.png", "app_normal.png", "settings_normal.png" };\r
 \r
             List<ShortcutInfo> TempList = new List<ShortcutInfo>();\r
             for (int i = 0; i < 3; i++)\r
@@ -59,7 +60,7 @@ namespace TVHome.ViewModels
                             new StateDescription\r
                             {\r
                                 Label = AppName[i],\r
-                                IconPath = "wifion.png",\r
+                                IconPath = AppIconPath[i],\r
                                 Action = new AppControlAction()\r
                                 {\r
                                     PkgID = AppControlID[i]\r