summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrina6350.you <rina6350.you@samsung.com>2017-04-14 04:52:05 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:33 (GMT)
commitb70ccb89c33c96438d6f2c5159e278d9d0dfd761 (patch)
tree993c9038a01e581b07f7aec83e743827820e19a6
parent52bca4642e59403f11899ce146363d8fc343b8c3 (diff)
downloadxamarin-forms-b70ccb89c33c96438d6f2c5159e278d9d0dfd761.zip
xamarin-forms-b70ccb89c33c96438d6f2c5159e278d9d0dfd761.tar.gz
xamarin-forms-b70ccb89c33c96438d6f2c5159e278d9d0dfd761.tar.bz2
Add ToolTip based on Tizen Specific
* 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
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs23
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs14
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj2
-rw-r--r--packaging/xamarin-forms-tizen.spec2
4 files changed, 39 insertions, 2 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs
index a7e7eff..6e3d456 100644..100755
--- a/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs
+++ b/Xamarin.Forms.Core/PlatformConfiguration/TizenSpecific/VisualElement.cs
@@ -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
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
index a103abf..8b28869 100644..100755
--- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
@@ -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;
diff --git a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj
index 26d6284..9a13995 100644..100755
--- a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj
+++ b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj
@@ -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" />
diff --git a/packaging/xamarin-forms-tizen.spec b/packaging/xamarin-forms-tizen.spec
index 63c0cc6..c782ccd 100644
--- a/packaging/xamarin-forms-tizen.spec
+++ b/packaging/xamarin-forms-tizen.spec
@@ -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