react / react/react-native

Android View doesnt go to bottom screen edge

Open
#43,557 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Author Provided Repro Newer Patch Available Platform: Android
Dominant language
C++
Stars
127k
Forks
25.3k
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Description

Our team realised that our apps we made, on certain Android device, the view doesnt go to the bottom edge of the screens. there's always a spacing. At first we thought it was React navigation that would create that spacings but we recently started a new project and we come to realise that it is native from React native. From the default source files of React native (the template we get from npx create-react-app) we have seen that the template use the SafeArea component, so we replaced it with a View component and tried with and without flex: 1 to his styles property but nothing changes, the spacings is still there. Is there a way of getting rid of it ?

PREVIEW OF CODE
Screenshot 2024-03-19 at 10 22 09 AM

PREVIEW ANDROID DEVICE (the spacings would be the black bar under the white scrollview)
Screenshot_20240319-112232

Steps to reproduce
  1. npx create-react-app
  2. npm run android (i'm using PIXEL 6)
React Native Version

0.72.12

Affected Platforms

Runtime - Android

Output of npx react-native info
System:
  OS: macOS 14.1.2
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 2.76 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.19.0
    path: /usr/local/opt/node@18/bin/node
  Yarn: Not Found
  npm:
    version: 10.2.3
    path: /usr/local/opt/node@18/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/michaellabelle/.rvm/gems/ruby-2.7.4/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 15.0.1/15A507
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.21
    path: /usr/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/michaellabelle/.rvm/rubies/ruby-2.7.4/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.12
    wanted: 0.72.12
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
Stacktrace or Logs
No crash or failure
Reproducer
https://snack.expo.dev/@mlabelle/rn---spacing-from-bottom-edge?platform=android
Screenshots and Videos

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Snack reproducer and a fresh project from npx create-react-app, using React Native 0.72.12 on the reported Pixel 6 setup. Compare the SafeArea component with a View, with and without flex: 1, and determine the expected bottom-edge behavior and whether the spacing is reproducible without navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.