I am trying to capture events on Keyboard Show/Hide events on Android with React Native
. I got stuck at a dead-end.
Here is my manifest setting:
<activity
android:launchMode="singleTop"
android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
</intent-filter>
</activity>
And here is my RN Component:
import React, {Component} from 'react';
import {
View,Keyboard
} from 'react-native';
export default class KeyboardAwareComponent extends Component {
componentDidMount() {
Keyboard.addListener("keyboardDidShow",()=>{
console.log("Show event");
})
}
render() {
return <View />
}
}
Thank you so much in Advance :)