From e5251ca80d64a9c36c136cc1fd9e06cc7d96217a Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 21 Sep 2022 16:14:46 +0500 Subject: [PATCH] mobile: fix keyboard height incorrect on android --- apps/mobile/app/screens/editor/wrapper.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/mobile/app/screens/editor/wrapper.js b/apps/mobile/app/screens/editor/wrapper.js index 26466af5b..1fae39098 100644 --- a/apps/mobile/app/screens/editor/wrapper.js +++ b/apps/mobile/app/screens/editor/wrapper.js @@ -63,13 +63,16 @@ export const EditorWrapper = ({ width }) => { }, [loading]); const getMarginBottom = () => { - const bottomInsets = Platform.OS === "android" ? 14 : insets.bottom || 14; + const bottomInsets = Platform.OS === "android" ? 12 : insets.bottom || 14; if (!keyboard.keyboardShown) return bottomInsets / 1.5; if (Platform.isPad && !floating) return bottomInsets; if (Platform.OS === "ios") return bottomInsets / 1.5; - return bottomInsets; + return 0; }; + const KeyboardAvoidingViewIOS = + Platform.OS === "ios" ? KeyboardAvoidingView : View; + return ( { style={{ width: width[!introCompleted ? "mobile" : deviceMode]?.c, height: "100%", + minHeight: "100%", backgroundColor: colors.bg, borderLeftWidth: DDS.isTab ? 1 : 0, borderLeftColor: DDS.isTab ? colors.nav : "transparent" }} > {loading || !introCompleted ? null : ( - { /> - + )} );