Skip to content

Commit

Permalink
fix android padding calc (#5877)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobar79 committed Jun 21, 2024
1 parent cd21e6a commit 37c16c1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/__swaps__/screens/Swap/components/SliderAndKeyboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ import { Box } from '@/design-system';
import { SwapNumberPad } from '@/__swaps__/screens/Swap/components/SwapNumberPad';
import { SwapSlider } from '@/__swaps__/screens/Swap/components/SwapSlider';
import { IS_ANDROID } from '@/env';
import { getSoftMenuBarHeight } from 'react-native-extra-dimensions-android';
import { getSoftMenuBarHeight, isSoftMenuBarEnabled } from 'react-native-extra-dimensions-android';
import { safeAreaInsetValues } from '@/utils';

const BOTTOM_OFFSET = IS_ANDROID ? getSoftMenuBarHeight() - 24 : safeAreaInsetValues.bottom + 16;
const getAndroidPadding = () => {
if (isSoftMenuBarEnabled()) {
return getSoftMenuBarHeight() - 24;
} else {
return safeAreaInsetValues.bottom + 34;
}
};

const BOTTOM_OFFSET = IS_ANDROID ? getAndroidPadding() : safeAreaInsetValues.bottom + 16;
const HEIGHT_OF_BOTTOM_TAB = 64;

export function SliderAndKeyboard() {
Expand Down

0 comments on commit 37c16c1

Please sign in to comment.