diff options
author | Seungkeun Lee <sngn.lee@samsung.com> | 2017-05-15 15:47:25 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-10-23 13:34:35 +0900 |
commit | af067b7714c87c8026d9cbb95d27dccd483cd1f3 (patch) | |
tree | 27c7b9ed02cf0bcac86b927ca4754f695d5d9531 /Xamarin.Forms.Platform.Tizen/Native | |
parent | 6245864078eebcb7784319ae620242294569cb27 (diff) | |
download | xamarin-forms-af067b7714c87c8026d9cbb95d27dccd483cd1f3.tar.gz xamarin-forms-af067b7714c87c8026d9cbb95d27dccd483cd1f3.tar.bz2 xamarin-forms-af067b7714c87c8026d9cbb95d27dccd483cd1f3.zip |
Update BackButton handling
- requried commit : https://review.tizen.org/gerrit/#/c/128937/
- KeyGrab with exclusive mode has issue
- BackButtonPressed event was introduced in ElmSharp
Change-Id: I9780ff0216e9dfb3ebc5b9e9bf11390fa60bfbec
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Native')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Native/Dialog.cs | 35 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Native/Window.cs | 14 |
2 files changed, 0 insertions, 49 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Dialog.cs b/Xamarin.Forms.Platform.Tizen/Native/Dialog.cs index c59755f7..6d1dde16 100644 --- a/Xamarin.Forms.Platform.Tizen/Native/Dialog.cs +++ b/Xamarin.Forms.Platform.Tizen/Native/Dialog.cs @@ -25,11 +25,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native } /// <summary> - /// Occurs when the hardware Back button is pressed. - /// </summary> - public event EventHandler BackButtonPressed; - - /// <summary> /// Occurs whenever the dialog is first displayed. /// </summary> public event EventHandler Shown; @@ -155,8 +150,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native ApplyButton(ButtonPosition.Negative, null); ApplyContent(null); - UngrabBackKey(); - base.OnUnrealize(); } @@ -166,7 +159,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native /// <remarks>When shown, the dialog will register itself for the back key press event handling.</remarks> protected virtual void OnShown() { - GrabBackKey(); } /// <summary> @@ -175,7 +167,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native /// <remarks>When dismissed, the dialog will unregister itself from the back key press event handling.</remarks> protected virtual void OnDismissed() { - UngrabBackKey(); } /// <summary> @@ -199,15 +190,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native { OnShown(); }; - - // Adds a handler for the KeyUp event. - // The handler checks whether the key just pressed is a back key - // and if that is the case, invokes the back button press handler of this instance. - KeyUp += (s, e) => - { - if (e.KeyName == EvasKeyEventArgs.PlatformBackButtonName) - BackButtonPressed?.Invoke(this, EventArgs.Empty); - }; } /// <summary> @@ -262,22 +244,5 @@ namespace Xamarin.Forms.Platform.Tizen.Native SetPartContent("default", _content, true); } - - /// <summary> - /// Registers this instance to be affected by pressing the hardware back key. - /// </summary> - void GrabBackKey() - { - KeyGrab(EvasKeyEventArgs.PlatformBackButtonName, true); - } - - /// <summary> - /// Unregisters this instance from being affected by pressing the hardware back key. - /// </summary> - void UngrabBackKey() - { - KeyUngrab(EvasKeyEventArgs.PlatformBackButtonName); - } - } } diff --git a/Xamarin.Forms.Platform.Tizen/Native/Window.cs b/Xamarin.Forms.Platform.Tizen/Native/Window.cs index 2bc45c66..3e982ae5 100644 --- a/Xamarin.Forms.Platform.Tizen/Native/Window.cs +++ b/Xamarin.Forms.Platform.Tizen/Native/Window.cs @@ -24,11 +24,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native public event EventHandler Closed; /// <summary> - /// Notifies that the back button has been pressed. - /// </summary> - public event EventHandler BackButtonPressed; - - /// <summary> /// Gets the current orientation. /// </summary> public DisplayOrientations CurrentOrientation @@ -105,15 +100,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native Unrealize(); }; - KeyGrab(EvasKeyEventArgs.PlatformBackButtonName, false); - KeyUp += (s, e) => - { - if (e.KeyName == EvasKeyEventArgs.PlatformBackButtonName) - { - BackButtonPressed?.Invoke(this, EventArgs.Empty); - } - }; - Active(); AutoDeletion = false; Show(); |