Пример #1
0
        private void OnKeyboardHide(NSNotification notification)
        {
            isKeyboardShown = false;

            var rect = UIKeyboard.FrameEndFromNotification(notification);

            KeyboardWillHide?.Invoke(this, rect.Height);
        }
Пример #2
0
        protected virtual void OnKeyboardWillHide([NotNull] KeyboardSizeChangedEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            KeyboardWillHide?.Invoke(this, e);
        }
Пример #3
0
        public void OnGlobalLayout()
        {
            GetInputMethodManager();

            if (!_wasShown && IsCurrentlyShown())
            {
                KeyboardWillShow?.Invoke(this, EventArgs.Empty);
                KeyboardDidShow?.Invoke(this, EventArgs.Empty);
                _wasShown = true;
            }
            else if (_wasShown && !IsCurrentlyShown())
            {
                KeyboardWillHide?.Invoke(this, EventArgs.Empty);
                KeyboardDidHide?.Invoke(this, EventArgs.Empty);
                _wasShown = false;
            }
        }
Пример #4
0
        private void NotifyKeyboardToggled()
        {
            if (inputManager.Handle == IntPtr.Zero)
            {
                inputManager = GetInputManager();
            }

            if (ActivityProvider.CurrentActivity.CurrentFocus is EditText && keyboardHeight > 0 && !isShowingKeyboard && inputManager.IsActive)
            {
                isShowingKeyboard = true;
                KeyboardWillShow?.Invoke(this, keyboardHeight);
                return;
            }
            if (!(ActivityProvider.CurrentActivity.CurrentFocus is EditText) && isShowingKeyboard && inputManager.IsActive)
            {
                KeyboardWillHide?.Invoke(this, keyboardHeight);
                isShowingKeyboard = false;
                return;
            }
        }
Пример #5
0
 private void KeyboardListner_KeyboardWillHide(object sender, double e)
 {
     KeyboardWillHide?.Invoke(this, e);
 }
Пример #6
0
 private void OnKeyboardWillHide(object sender, UIKeyboardEventArgs e)
 {
     KeyboardWillHide?.Invoke(this, EventArgs.Empty);
 }
Пример #7
0
 private void OnKeyboardWillHide(KeyboardVisibilityChangedEventArgs args)
 {
     KeyboardWillHide?.Invoke(this, args);
 }
 internal void OnKeyboardWillHide()
 {
     KeyboardWillHide?.Invoke(this, null);
 }