fix: Remove extra bottom padding on Android (#2915)
This commit is contained in:
committed by
GitHub
parent
74923a1f6b
commit
c52030a525
@@ -6,8 +6,8 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"android-dev": "react-native run-android --mode devDebug --appIdSuffix dev",
|
"android-dev": "react-native run-android --mode devDebug --appIdSuffix dev",
|
||||||
"android-prod-debug": "react-native run-android --variant prodDebug",
|
"android-prod-debug": "react-native run-android --mode prodDebug",
|
||||||
"android-prod-release": "yarn run android:bundle && react-native run-android --variant prodRelease",
|
"android-prod-release": "yarn run android:bundle && react-native run-android --mode prodRelease",
|
||||||
"android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/",
|
"android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/",
|
||||||
"build": "yarn bundle:web && yarn install:pods && yarn android:bundle",
|
"build": "yarn bundle:web && yarn install:pods && yarn android:bundle",
|
||||||
"clear-cache": "watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-*",
|
"clear-cache": "watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-*",
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ export const useAvailableSafeAreaPadding = () => {
|
|||||||
const [isKeyboardVisible, setIsKeyboardVisible] = useState(false)
|
const [isKeyboardVisible, setIsKeyboardVisible] = useState(false)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return application.addNativeMobileEventListener((event) => {
|
return application.addNativeMobileEventListener((event) => {
|
||||||
if (event === ReactNativeToWebEvent.KeyboardWillShow) {
|
if (event === ReactNativeToWebEvent.KeyboardWillShow || event === ReactNativeToWebEvent.KeyboardDidShow) {
|
||||||
setIsKeyboardVisible(true)
|
setIsKeyboardVisible(true)
|
||||||
} else if (event === ReactNativeToWebEvent.KeyboardWillHide) {
|
} else if (event === ReactNativeToWebEvent.KeyboardWillHide || event === ReactNativeToWebEvent.KeyboardDidHide) {
|
||||||
setIsKeyboardVisible(false)
|
setIsKeyboardVisible(false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user