Ejemplo n.º 1
0
        private void OnKeyboardHide(NSNotification notification)
        {
            isKeyboardShown = false;

            var rect = UIKeyboard.FrameEndFromNotification(notification);

            KeyboardWillHide?.Invoke(this, rect.Height);
        }
Ejemplo n.º 2
0
        protected virtual void OnKeyboardWillHide([NotNull] KeyboardSizeChangedEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            KeyboardWillHide?.Invoke(this, e);
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 5
0
 private void KeyboardListner_KeyboardWillHide(object sender, double e)
 {
     KeyboardWillHide?.Invoke(this, e);
 }
Ejemplo n.º 6
0
 private void OnKeyboardWillHide(object sender, UIKeyboardEventArgs e)
 {
     KeyboardWillHide?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 7
0
 private void OnKeyboardWillHide(KeyboardVisibilityChangedEventArgs args)
 {
     KeyboardWillHide?.Invoke(this, args);
 }
 internal void OnKeyboardWillHide()
 {
     KeyboardWillHide?.Invoke(this, null);
 }