Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Update ActiveBezelInteractionElement on Activate #302

Merged
merged 1 commit into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Xamarin.Forms;
using Xamarin.Forms.Platform.Tizen;
using ERotaryEventManager = ElmSharp.Wearable.RotaryEventManager;
using AppSpecific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Application;

[assembly: ExportRenderer(typeof(BezelInteractionPage), typeof(Tizen.Wearable.CircularUI.Forms.Renderer.BezelInteractionPageRenderer))]

Expand Down Expand Up @@ -113,6 +114,7 @@ void ActivateRotaryWidget()
{
GetRotaryWidget(_currentRotaryFocusObject)?.Activate();
}
AppSpecific.SetActiveBezelInteractionElement(Application.Current, base.Element);
}

void DeactivateRotaryWidget()
Expand All @@ -125,6 +127,8 @@ void DeactivateRotaryWidget()
{
GetRotaryWidget(_currentRotaryFocusObject)?.Deactivate();
}
if (AppSpecific.GetActiveBezelInteractionElement(Application.Current) == base.Element)
AppSpecific.SetActiveBezelInteractionElement(Application.Current, null);
}

void OnPageDisappearing(object sender, EventArgs e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using ERotaryEventManager = ElmSharp.Wearable.RotaryEventManager;
using NPage = Xamarin.Forms.Platform.Tizen.Native.Page;
using XForms = Xamarin.Forms.Forms;
using AppSpecific = Xamarin.Forms.PlatformConfiguration.TizenSpecific.Application;

[assembly: ExportRenderer(typeof(CirclePage), typeof(Tizen.Wearable.CircularUI.Forms.Renderer.CirclePageRenderer))]

Expand Down Expand Up @@ -389,6 +390,7 @@ void ActivateRotaryWidget()
{
GetRotaryWidget(_currentRotaryFocusObject)?.Activate();
}
AppSpecific.SetActiveBezelInteractionElement(Application.Current, base.Element);
}

void DeactivateRotaryWidget()
Expand All @@ -401,6 +403,8 @@ void DeactivateRotaryWidget()
{
GetRotaryWidget(_currentRotaryFocusObject)?.Deactivate();
}
if (AppSpecific.GetActiveBezelInteractionElement(Application.Current) == base.Element)
AppSpecific.SetActiveBezelInteractionElement(Application.Current, null);
}

IRotaryActionWidget GetRotaryWidget(IRotaryFocusable focusable)
Expand Down