Skip to content

Dimensions.get('window').height not consistent in Android 14 and Android 15 #47080

@arnoldc

Description

@arnoldc

Description

Hi React Native team

There seems to be issue with the latest Android 15 release,

The Dimensions.get('window').height seems not consistent in the model device Pixel6a , i think its same for other pixel devices which has latest android 15 recently

Android 14 (pixel 6a - emulator) Android 15 (pixel 6a - real device)
Screenshot 2024-10-17 at 3 45 37 PM Screenshot_20241017-154526

I tried using the react native boiler plate which is running on 0.75.4
as you can see the numbers in the screenshot for height are different, so any idea whats causing the issue why Android 15 has different results from android 14, even if their model device is same?

Steps to reproduce

  1. create new project from via npx react-native init projectname and begin running it
  2. Use two android version for this test , particularly use Android 14 Pixel 6A , and another Android 15 Pixel 6A
    i think any pixel version will do
  3. Add this text as the content <Text style={{ fontSize: 30 }}>HEIGHT: {Dimensions.get('window').height} and begin comparing the two

React Native Version

0.75.4

Affected Platforms

Runtime - Android

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: macOS 14.2.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 104.83 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.17.1
    path: ~/.nvm/versions/node/v18.17.1/bin/node
  Yarn:
    version: 3.6.4
    path: /opt/homebrew/bin/yarn
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.17.1/bin/npm
  Watchman:
    version: 2023.07.03.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/arnoldcamas/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-28 | Google APIs ARM 64 v8a
      - android-28 | Google ARM64-V8a Play ARM 64 v8a
      - android-29 | Intel x86 Atom_64
      - android-29 | Google APIs ARM 64 v8a
      - android-29 | Google APIs Intel x86 Atom
      - android-29 | Google Play ARM 64 v8a
      - android-30 | Google APIs ARM 64 v8a
      - android-30 | Google APIs Intel x86_64 Atom
      - android-30 | Google Play ARM 64 v8a
      - android-30 | Google APIs ATD ARM 64 v8a
      - android-30 | Google APIs ATD Intel x86 Atom
      - android-31 | Google APIs ARM 64 v8a
      - android-31 | Google APIs Intel x86_64 Atom
      - android-31 | Google Play ARM 64 v8a
      - android-32 | Google APIs ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-35 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /Users/arnoldcamas/Library/Java/JavaVirtualMachines/corretto-17.0.10/Contents/Home/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/arnoldcamas/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.4
    wanted: 0.75.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

none

Reproducer

https://snack.expo.dev/@arnoldc/4dc13a

Screenshots and Videos

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions