Esempio n. 1
0
        private void ViewTreeObserver_GlobalFocusChange(object sender, ViewTreeObserver.GlobalFocusChangeEventArgs e)
        {
            int[] screenLocation = new int[2];

            e.NewFocus.GetLocationInWindow(screenLocation);

            clickYPosition = screenLocation[1];
        }
 private void ViewTreeObserver_GlobalFocusChange(object sender, ViewTreeObserver.GlobalFocusChangeEventArgs e)
 {
     if (e.NewFocus != Card && e.NewFocus != Label && e.NewFocus != Image && e.NewFocus != EditText && e.NewFocus != EditTextLayout)
     {
         if (string.IsNullOrWhiteSpace(EditText.Text))
         {
             Reduce();
         }
     }
 }
Esempio n. 3
0
 private void OnViewTreeObserverOnGlobalFocusChange(object sender, ViewTreeObserver.GlobalFocusChangeEventArgs args)
 {
     if (args.NewFocus == null)
     {
         _viewWithLastFocus = null;
         return;
     }
     if (args.NewFocus != ListView)
     {
         //check if it's one of our's
         var parent = args.NewFocus.Parent;
         while (parent != null && parent != parent.Parent)
         {
             if (parent == ListView)
             {
                 _viewWithLastFocus = args.NewFocus;
                 break;
             }
             parent = parent.Parent;
         }
     }
 }