Exemplo n.º 1
0
 private void EditTextOnFocusChange(object sender, View.FocusChangeEventArgs e)
 {
     if (!e.HasFocus && Element.Parent.Parent is PlaceholderEntry entry)
     {
         entry.OnLostFocus(Element);
     }
 }
Exemplo n.º 2
0
 void OnPlatformViewFocusChange(object?sender, PlatformView.FocusChangeEventArgs e)
 {
     if (VirtualView != null)
     {
         VirtualView.IsFocused = e.HasFocus;
     }
 }
Exemplo n.º 3
0
 void OnNativeViewFocusChange(object?sender, AView.FocusChangeEventArgs e)
 {
     if (VirtualView != null)
     {
         VirtualView.IsFocused = e.HasFocus;
     }
 }
 private void Control_FocusChange(object sender, View.FocusChangeEventArgs e)
 {
     if (e == null)
     {
         return;
     }
     UpdateFocus(e.HasFocus);
     UpdateBorderColor();
 }
Exemplo n.º 5
0
 private static void FocusChange(AndroidView.FocusChangeEventArgs e, XamarinView element)
 {
     if (e.HasFocus)
     {
         _focusedElement = element;
         _elementHeight  = element.Bounds.Height;
     }
     else
     {
         _focusedElement = null;
     }
 }
 private void HideMethod(object sender, View.FocusChangeEventArgs e)
 {
     try
     {
         //hide keyboard for current focused control.
         var imm = (InputMethodManager)_activity?.GetSystemService(Context.InputMethodService);
         imm?.HideSoftInputFromWindow(Control.WindowToken, HideSoftInputFlags.None);
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine(ex);
     }
 }
Exemplo n.º 7
0
 private void ActionView_FocusChange(object sender, View.FocusChangeEventArgs e)
 {
     Toast.MakeText(this, "rad", ToastLength.Short).Show();
 }