summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
index 51170bd6..d7f77150 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
@@ -5,6 +5,7 @@ using System.ComponentModel;
using ElmSharp;
using ESize = ElmSharp.Size;
using ERect = ElmSharp.Rect;
+using EFocusDirection = ElmSharp.FocusDirection;
using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.VisualElement;
using XFocusDirection = Xamarin.Forms.PlatformConfiguration.TizenSpecific.FocusDirection;
@@ -809,7 +810,7 @@ namespace Xamarin.Forms.Platform.Tizen
var widget = NativeView as Widget;
if (widget != null)
{
- widget.FocusNext(direction.ToNative());
+ widget.FocusNext(ConvertToNativeFocusDirection(direction));
}
else
{
@@ -818,7 +819,7 @@ namespace Xamarin.Forms.Platform.Tizen
}
}
- void SetNextFocusViewInternal(XFocusDirection direction)
+ void SetNextFocusViewInternal(string direction)
{
var widget = NativeView as Widget;
if (widget != null)
@@ -850,7 +851,7 @@ namespace Xamarin.Forms.Platform.Tizen
}
if (nativeControl != null)
{
- widget.SetNextFocusObject(nativeControl, direction.ToNative());
+ widget.SetNextFocusObject(nativeControl, ConvertToNativeFocusDirection(direction));
}
}
else
@@ -994,6 +995,17 @@ namespace Xamarin.Forms.Platform.Tizen
NativeView.EvasMap = map;
}
}
+
+ EFocusDirection ConvertToNativeFocusDirection(string direction) {
+ if (direction == XFocusDirection.Back) return EFocusDirection.Previous;
+ if (direction == XFocusDirection.Forward) return EFocusDirection.Next;
+ if (direction == XFocusDirection.Up) return EFocusDirection.Up;
+ if (direction == XFocusDirection.Down) return EFocusDirection.Down;
+ if (direction == XFocusDirection.Right) return EFocusDirection.Right;
+ if (direction == XFocusDirection.Left) return EFocusDirection.Left;
+
+ return EFocusDirection.Next;
+ }
}
internal static class Settings