INNER CODE UNIT · JavaScript

keyboardSpace

Andr3wHur5t/react-native-keyboard-spacer · KeyboardSpacer.js:94

    const keyboardSpace = (screenHeight - event.endCoordinates.screenY) + this.props.topSpacing;
    this.setState({
      keyboardSpace,
      isKeyboardOpened: true
    }, this.props.onToggle(true, keyboardSpace));
  }

  resetKeyboardSpace(event) {
    let animationConfig = defaultAnimation;
    if (Platform.OS === 'ios') {
      animationConfig = LayoutAnimation.create(
        event.duration,
        LayoutAnimation.Types[event.easing],
        LayoutAnimation.Properties.opacity,
      );
    }
    LayoutAnimation.configureNext(animationConfig);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…