diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2017-05-17 02:21:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2017-05-17 02:21:20 +0000 |
commit | c575d5d29418f2b3d027709aa5fcdcd7947ba41d (patch) | |
tree | 70a3ed25d9b5a7dbeca5284f36fa49fafca7529c /Xamarin.Forms.Platform.Tizen | |
parent | 459fea7a6559a79a6bdf737a8af234e959b79a3f (diff) | |
parent | 32835b4fc55ea3442baf392f4c7c80a0e4a9c049 (diff) | |
download | xamarin-forms-c575d5d29418f2b3d027709aa5fcdcd7947ba41d.tar.gz xamarin-forms-c575d5d29418f2b3d027709aa5fcdcd7947ba41d.tar.bz2 xamarin-forms-c575d5d29418f2b3d027709aa5fcdcd7947ba41d.zip |
Merge "Update BackButton handling" into tizen
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Native/Dialog.cs | 35 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Native/Window.cs | 14 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj | 2 |
3 files changed, 1 insertions, 50 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(); diff --git a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj index 22ff9d7d..1c396263 100644 --- a/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj +++ b/Xamarin.Forms.Platform.Tizen/Xamarin.Forms.Platform.Tizen.csproj @@ -9,7 +9,7 @@ <PackageReference Include="Tizen" Version="1.0.5" /> <PackageReference Include="Tizen.Applications.Common" Version="1.5.5" /> <PackageReference Include="Tizen.Applications.UI" Version="1.5.5" /> - <PackageReference Include="ElmSharp" Version="1.1.0-beta-022" /> + <PackageReference Include="ElmSharp" Version="1.1.0-beta-024" /> <PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" /> <PackageReference Include="Tizen.System.Information" Version="1.0.2" /> <PackageReference Include="Tizen.WebView" Version="1.0.0" /> |