Add ToolTip based on Tizen Specific
authorrina6350.you <rina6350.you@samsung.com>
Fri, 14 Apr 2017 04:52:05 +0000 (13:52 +0900)
committerKangho Hur <kangho.hur@samsung.com>
Mon, 10 Jul 2017 02:11:23 +0000 (11:11 +0900)
* Update the version of the used elm-sharp.
* Update the version of xamarin package to 2.3.4-r214-005.

TASK=TCAPI-2259

change-Id: I1f0c65c3d67030b7a690fd0839a0a851c4f1bcba

Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs [changed mode: 0644->0755]
Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs [changed mode: 0644->0755]
Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj [changed mode: 0644->0755]
packaging/xamarin-forms-tizen.spec

old mode 100644 (file)
new mode 100755 (executable)
index a7e7eff..6e3d456
@@ -24,6 +24,8 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
 
                public static readonly BindableProperty NextFocusForwardViewProperty = BindableProperty.Create("NextFocusForwardView", typeof(View), typeof(VisualElement), default(View));
 
+               public static readonly BindableProperty ToolTipProperty = BindableProperty.Create("ToolTip", typeof(string), typeof(VisualElement), default(string));
+
                public static string GetStyle(BindableObject element)
                {
                        return (string)element.GetValue(StyleProperty);
@@ -257,5 +259,26 @@ namespace Xamarin.Forms.PlatformConfiguration.TizenSpecific
                {
                        bindable.SetValue(NextFocusDirectionProperty, FocusDirection.None);
                }
+
+               public static string GetToolTip(BindableObject element)
+               {
+                       return (string)element.GetValue(ToolTipProperty);
+               }
+
+               public static void SetToolTip(BindableObject element, string value)
+               {
+                       element.SetValue(ToolTipProperty, value);
+               }
+
+               public static string GetToolTip(this IPlatformElementConfiguration<Tizen, FormsElement> config)
+               {
+                       return GetToolTip(config.Element);
+               }
+
+               public static IPlatformElementConfiguration<Tizen, FormsElement> SetToolTip(this IPlatformElementConfiguration<Tizen, FormsElement> config, string value)
+               {
+                       SetToolTip(config.Element, value);
+                       return config;
+               }
        }
 }
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index a103abf..8b28869
@@ -66,6 +66,7 @@ namespace Xamarin.Forms.Platform.Tizen
                        RegisterPropertyHandler(Specific.NextFocusRightViewProperty, UpdateFocusRightView);
                        RegisterPropertyHandler(Specific.NextFocusBackViewProperty, UpdateFocusBackView);
                        RegisterPropertyHandler(Specific.NextFocusForwardViewProperty, UpdateFocusForwardView);
+                       RegisterPropertyHandler(Specific.ToolTipProperty, UpdateToolTip);
 
                        RegisterPropertyHandler(VisualElement.AnchorXProperty, ApplyTransformation);
                        RegisterPropertyHandler(VisualElement.AnchorYProperty, ApplyTransformation);
@@ -835,6 +836,19 @@ namespace Xamarin.Forms.Platform.Tizen
                        }
                }
 
+               void UpdateToolTip()
+               {
+                       var tooltip = Specific.GetToolTip(Element);
+                       if (tooltip != null)
+                       {
+                               NativeView.SetTooltipText(tooltip);
+                       }
+                       else
+                       {
+                               NativeView.UnsetTooltip();
+                       }
+               }
+
                void SetNextFocusViewInternal(string direction)
                {
                        var widget = NativeView as Widget;
old mode 100644 (file)
new mode 100755 (executable)
index 26d6284..9a13995
@@ -6,7 +6,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="ElmSharp" Version="1.1.0-beta-018" />
+    <PackageReference Include="ElmSharp" Version="1.1.0-beta-021" />
     <PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" />
     <PackageReference Include="Tizen.Applications" Version="1.3.2" />
     <PackageReference Include="Tizen.System.Information" Version="1.0.2" />
index 63c0cc6..c782ccd 100644 (file)
@@ -2,7 +2,7 @@
 %define XF_RELEASE 214
 
 # Increase this XF_DEV_VERSION when any public APIs of Xamarin.Forms.Platform.Tizen are changed.
-%define XF_DEV_VERSION 004
+%define XF_DEV_VERSION 005
 
 Name: xamarin-forms-tizen
 Summary: Xamarin.Forms for Tizen platform