void OnFocusChange(object?sender, global::Android.Views.View.FocusChangeEventArgs e)
        {
            if (PlatformView == null)
            {
                return;
            }

            if (e.HasFocus)
            {
                if (PlatformView.Clickable)
                {
                    PlatformView.CallOnClick();
                }
                else
                {
                    OnClick(PlatformView, EventArgs.Empty);
                }
            }
            else if (_dialog != null)
            {
                _dialog.Hide();
                PlatformView.ClearFocus();
                _dialog = null;
            }
        }
 void Control_FocusChange(object sender, global::Android.Views.View.FocusChangeEventArgs e)
 {
     if (e.HasFocus)
     {
         ShowTimePicker();
     }
 }
Example #3
0
 private static void OnFocusChanged(object sender, global::Android.Views.View.FocusChangeEventArgs e)
 {
     if (sender is TextInputEditText textInputEditText)
     {
         // Delay padding update until after the keyboard has showed up otherwise updating the padding
         // stops the keyboard from showing up
         // TODO closure
         if (e.HasFocus)
         {
             Device.BeginInvokeOnMainThread(() => UpdatePadding(textInputEditText));
         }
         else
         {
             UpdatePadding(textInputEditText);
         }
     }
 }