diff --git a/README.md b/README.md index fb6d547..3d9ebb1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ A ScrollView component that handles keyboard appearance and automatically scroll

## Supported versions -Use `react-native>=0.25.0` for `v0.0.7` & up and `v0.0.6` for older RN versions. +`v0.1.2` requires `RN>=0.27.2` +`v0.0.7` requires `react-native>=0.25.0` +use `v0.0.6` for older RN versions. ## Installation Installation can be done through ``npm``: diff --git a/lib/KeyboardAwareMixin.js b/lib/KeyboardAwareMixin.js index d9680b7..8d740c9 100644 --- a/lib/KeyboardAwareMixin.js +++ b/lib/KeyboardAwareMixin.js @@ -1,7 +1,7 @@ /* @flow */ import { PropTypes } from 'react' -import ReactNative, { TextInput, DeviceEventEmitter } from 'react-native' +import ReactNative, { TextInput, Keyboard } from 'react-native' import TimerMixin from 'react-timer-mixin' const _KAM_DEFAULT_TAB_BAR_HEIGHT = 49 @@ -73,8 +73,8 @@ const KeyboardAwareMixin = { componentDidMount: function () { // Keyboard events - this.keyboardWillShowEvent = DeviceEventEmitter.addListener('keyboardWillShow', this.updateKeyboardSpace) - this.keyboardWillHideEvent = DeviceEventEmitter.addListener('keyboardWillHide', this.resetKeyboardSpace) + this.keyboardWillShowEvent = Keyboard.addListener('keyboardWillShow', this.updateKeyboardSpace) + this.keyboardWillHideEvent = Keyboard.addListener('keyboardWillHide', this.resetKeyboardSpace) }, componentWillUnmount: function () {