What is the difference between a window and a screen in the size API

In my iOS emulator, they return the same values.

I understand the difference in a regular browser, but what is the difference in React Native? Are there scenarios in which they return different values?

+6
source share
1 answer

The size documentation is pretty bad (an incomprehensible problem ), so you have to dive into the code to understand what is happening. If you look at the source of Dimensions , you will see this comment on line 47:

// Screen and window dimensions are different on android

, , , , .

Android, , , , Android :

  • /
  • / ( )

Android, , , window height < screen . , , :

  • window: /
  • screen: /

Android, , .

+11

All Articles