blob: 9cc02b2adbe7e444e0eae46b0758443d0bacf4a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
namespace Xamarin.Forms.Platform.Tizen
{
public static class KeyboardExtensions
{
/// <summary>
/// Creates an instance of ElmSharp.Keyboard reflecting the provided Xamarin.Forms.Keyboard instance
/// </summary>
/// <returns>Keyboard type corresponding to the provided Xamarin.Forms.Keyboard</returns>
/// <param name="keyboard">The Xamarin.Forms.Keyboard class instance to be converted to ElmSharp.Keyboard.</param>
public static Native.Keyboard ToNative(this Keyboard keyboard)
{
if (keyboard is NumericKeyboard)
{
return Native.Keyboard.Number;
}
else if (keyboard is TelephoneKeyboard)
{
return Native.Keyboard.PhoneNumber;
}
else if (keyboard is EmailKeyboard)
{
return Native.Keyboard.Email;
}
else if (keyboard is UrlKeyboard)
{
return Native.Keyboard.Url;
}
else if (keyboard is ChatKeyboard)
{
return Native.Keyboard.Emoticon;
}
else
{
return Native.Keyboard.Normal;
}
}
}
}
|