Ejemplo n.º 1
0
 protected virtual void UpdateRotaryInteraction(bool enable)
 {
     if (NativeView is IRotaryInteraction ri)
     {
         if (Specific.GetUseBezelInteraction(Application.Current))
         {
             if (enable)
             {
                 ri.RotaryWidget?.Activate();
                 Forms.RotaryFocusObject = Element;
                 Specific.SetActiveBezelInteractionElement(Application.Current, Element);
             }
             else
             {
                 ri.RotaryWidget?.Deactivate();
                 if (Forms.RotaryFocusObject == Element)
                 {
                     Forms.RotaryFocusObject = null;
                 }
                 if (Specific.GetActiveBezelInteractionElement(Application.Current) == Element)
                 {
                     Specific.SetActiveBezelInteractionElement(Application.Current, null);
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnPickerClosed(object sender, EventArgs args)
 {
     if (Specific.GetUseBezelInteraction(Application.Current))
     {
         if (Forms.RotaryFocusObject == Element)
         {
             Forms.RotaryFocusObject = null;
         }
         if (Specific.GetActiveBezelInteractionElement(Application.Current) == Element)
         {
             Specific.SetActiveBezelInteractionElement(Application.Current, null);
         }
     }
 }
Ejemplo n.º 3
0
 void DeactivateRotaryWidget()
 {
     if (_currentRotaryFocusObject is IRotaryEventReceiver)
     {
         ERotaryEventManager.Rotated -= OnRotaryEventChanged;
     }
     else if (_currentRotaryFocusObject is IRotaryFocusable)
     {
         GetRotaryWidget(_currentRotaryFocusObject)?.Deactivate();
     }
     if (AppSpecific.GetActiveBezelInteractionElement(Application.Current) == base.Element)
     {
         AppSpecific.SetActiveBezelInteractionElement(Application.Current, null);
     }
 }