fix: Remove extra bottom padding on Android (#2915)

This commit is contained in:
Antonella Sgarlatta
2025-07-18 11:16:30 -03:00
committed by GitHub
parent 74923a1f6b
commit c52030a525
2 changed files with 4 additions and 4 deletions

View File

@@ -6,8 +6,8 @@
"license": "AGPL-3.0",
"scripts": {
"android-dev": "react-native run-android --mode devDebug --appIdSuffix dev",
"android-prod-debug": "react-native run-android --variant prodDebug",
"android-prod-release": "yarn run android:bundle && react-native run-android --variant prodRelease",
"android-prod-debug": "react-native run-android --mode prodDebug",
"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/",
"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-*",

View File

@@ -14,9 +14,9 @@ export const useAvailableSafeAreaPadding = () => {
const [isKeyboardVisible, setIsKeyboardVisible] = useState(false)
useEffect(() => {
return application.addNativeMobileEventListener((event) => {
if (event === ReactNativeToWebEvent.KeyboardWillShow) {
if (event === ReactNativeToWebEvent.KeyboardWillShow || event === ReactNativeToWebEvent.KeyboardDidShow) {
setIsKeyboardVisible(true)
} else if (event === ReactNativeToWebEvent.KeyboardWillHide) {
} else if (event === ReactNativeToWebEvent.KeyboardWillHide || event === ReactNativeToWebEvent.KeyboardDidHide) {
setIsKeyboardVisible(false)
}
})