Пример #1
0
 public void FocusOnTextField()
 {
     _addressEditText.PostDelayed(() =>
     {
         // if _collectionChangedSubscription is null, we left the screen
         if (_collectionChangedSubscription.Disposable != null)
         {
             _addressEditText.RequestFocusFromTouch();
             _addressEditText.ShowKeyboard();
             _addressEditText.SetCursorAtEnd();
         }
     }, 400);
 }
        public void SetHasFocus(bool hasFocus)
        {
            this.hasFocus = hasFocus;

            if (hasFocus)
            {
                Expand();

                editText.PostDelayed(() =>
                {
                    editText.RequestFocusFromTouch();
                    inputMethodManager.ShowSoftInput(editText, 0);
                    // added as keyboard doesnt auto show on edit text visibility.
                    inputMethodManager.ToggleSoftInput(ShowFlags.Forced, 0);
                }, 300);
            }
            else
            {
                Reduce();
            }
        }