Fix android bottom

This commit is contained in:
Marc Rousavy
2021-02-19 21:14:42 +01:00
parent f1a2db1141
commit 27f5ad016b
3 changed files with 15 additions and 2 deletions

View File

@@ -3,11 +3,15 @@ import StaticSafeAreaInsets from "react-native-static-safe-area-insets";
export const CONTENT_SPACING = 15;
const SAFE_BOTTOM = Platform.select({
ios: StaticSafeAreaInsets.safeAreaInsetsBottom
}) ?? 0
export const SAFE_AREA_PADDING = {
paddingLeft: StaticSafeAreaInsets.safeAreaInsetsLeft + CONTENT_SPACING,
paddingTop: StaticSafeAreaInsets.safeAreaInsetsTop + CONTENT_SPACING,
paddingRight: StaticSafeAreaInsets.safeAreaInsetsRight + CONTENT_SPACING,
paddingBottom: StaticSafeAreaInsets.safeAreaInsetsBottom + CONTENT_SPACING
paddingBottom: SAFE_BOTTOM + CONTENT_SPACING
}
// whether to use takeSnapshot() instead of takePhoto() on Android