Skip to content

[Android] Bottom sheets do not resize when keyboard is open when using fitToContents #3181

@Armster15

Description

@Armster15

Description

Whereas on iOS, bottom sheets with sheetAllowedDetents: "fitToContents" resize/adjust automatically when the keyboard is open, this does not occur on Android.

CleanShot.2025-08-29.at.13.08.06.mp4

Expected behavior: bottom sheet on Android automatically adjusts for keyboard like it does on iOS.

I am using bottom sheets as follows. Note I am using Expo Router for routing:

import { Stack } from "expo-router";

export default function TabTwoScreen() {
  return (
    <Stack>
      <Stack.Screen name="index" options={{ title: "Explore" }} />
      <Stack.Screen
        name="nested"
        options={{
          title: "Nested",

          presentation: "formSheet",
          gestureDirection: "vertical",
          animation: "slide_from_bottom",
          sheetGrabberVisible: true,
          sheetInitialDetentIndex: 0,

          sheetAllowedDetents: "fitToContents",
        }}
      />
    </Stack>
  );
}

Steps to reproduce

  1. create-expo-app
  2. Create a screen as a bottom sheet using React Navigation with the following options + add a TextInput to the screen
    options={{ 
      presentation: 'formSheet',
      gestureDirection: 'vertical',
      animation: 'slide_from_bottom',
      sheetGrabberVisible: true,
      sheetInitialDetentIndex: 0,
      sheetAllowedDetents: "fitToContents",
    }}
  3. Try opening text input with keyboard on Android. See bug.

My repro is this but using the default create-expo-router template.

Snack or a link to a repository

https://github.com/Armster15/rn-screens-bottom-sheet-bug

Screens version

4.11.1

React Native version

0.79.6

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Fabric (New Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

Labels

Platform: AndroidThis issue is specific to AndroidRepro providedA reproduction with a snack or repo is provided

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions