diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2017-10-23 07:27:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2017-10-23 07:27:58 +0000 |
commit | 08b29b0798f62c13a722ec9c92a749e4b142778e (patch) | |
tree | e8a5f7faeef12c127deb81fa780198e929853518 | |
parent | 46e568d0cc6bd134fdfd73ca62b1c6549b37d6a4 (diff) | |
parent | 18840c4d9341d1926d1913f715deb60aacfd1162 (diff) | |
download | xamarin-forms-08b29b0798f62c13a722ec9c92a749e4b142778e.tar.gz xamarin-forms-08b29b0798f62c13a722ec9c92a749e4b142778e.tar.bz2 xamarin-forms-08b29b0798f62c13a722ec9c92a749e4b142778e.zip |
Merge "Fixed incorrect appearance and behavior of Entry Keyboard Property." into tizen
4 files changed, 18 insertions, 7 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Extensions/KeyboardExtensions.cs b/Xamarin.Forms.Platform.Tizen/Extensions/KeyboardExtensions.cs index 6acfe3f6..0984b022 100644 --- a/Xamarin.Forms.Platform.Tizen/Extensions/KeyboardExtensions.cs +++ b/Xamarin.Forms.Platform.Tizen/Extensions/KeyboardExtensions.cs @@ -13,7 +13,7 @@ namespace Xamarin.Forms.Platform.Tizen { if (keyboard == Keyboard.Numeric) { - return Native.Keyboard.NumberOnly; + return Native.Keyboard.Numeric; } else if (keyboard == Keyboard.Telephone) { @@ -27,10 +27,6 @@ namespace Xamarin.Forms.Platform.Tizen { return Native.Keyboard.Url; } - else if (keyboard == Keyboard.Chat) - { - return Native.Keyboard.Emoticon; - } else { return Native.Keyboard.Normal; diff --git a/Xamarin.Forms.Platform.Tizen/Native/Entry.cs b/Xamarin.Forms.Platform.Tizen/Native/Entry.cs index 8276aaa2..9b84cb3d 100644 --- a/Xamarin.Forms.Platform.Tizen/Native/Entry.cs +++ b/Xamarin.Forms.Platform.Tizen/Native/Entry.cs @@ -12,6 +12,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native /// </summary> public class Entry : EEntry, IMeasurable, IBatchable { + static readonly int s_VariationNormal = 0; + static readonly int s_VariationSignedAndDecimal = 3; + /// <summary> /// Holds the formatted text of the entry. /// </summary> @@ -401,10 +404,18 @@ namespace Xamarin.Forms.Platform.Tizen.Native { SetInputPanelEnabled(false); } + else if (Keyboard == Keyboard.Numeric) + { + SetInputPanelEnabled(true); + SetInputPanelLayout(InputPanelLayout.NumberOnly); + // InputPanelVariation is used to allow using deciaml point. + InputPanelVariation = s_VariationSignedAndDecimal; + } else { SetInputPanelEnabled(true); SetInputPanelLayout((InputPanelLayout)keyboard); + InputPanelVariation = s_VariationNormal; } } diff --git a/Xamarin.Forms.Platform.Tizen/Native/Keyboard.cs b/Xamarin.Forms.Platform.Tizen/Native/Keyboard.cs index 4223ca08..40b21e47 100644 --- a/Xamarin.Forms.Platform.Tizen/Native/Keyboard.cs +++ b/Xamarin.Forms.Platform.Tizen/Native/Keyboard.cs @@ -78,7 +78,12 @@ /// <summary> /// Keyboard layout type emoticons. /// </summary> - Emoticon + Emoticon, + + /// <summary> + /// Keyboard layout type numeric. + /// </summary> + Numeric = Emoticon + 2017, } } diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs index 14cc5b65..5de5db00 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs @@ -1,5 +1,4 @@ using System; -using Xamarin.Forms.Platform.Tizen.Native; using Specific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Entry; namespace Xamarin.Forms.Platform.Tizen |