Tablets and Foldables

Detecting Tablets, Foldables and Orientation

"Is this a tablet?" is the wrong question: Android's guidance says to avoid physical hardware values for layout, because one device can show your app full screen, split-screen or across a foldable's panels. Ask how much room the window has, and group widths into classes:

Android's window width classes, applied to React Native 36,878 layouts
Width class Window width Typical layout
Compact under 600 dp One column, bottom tabs
Medium 600 to 839 dp Two or three columns, navigation rail
Expanded 840 dp and up List and detail side by side

Orientation follows from the same numbers: width > height from useWindowDimensions() is landscape, and it updates when the device rotates or a foldable opens. Android 16 makes this unavoidable. For apps targeting API 36, which Google Play 1 now requires, the system ignores screenOrientation, resizeableActivity and aspect-ratio limits on displays at least 600 dp wide, so a portrait-only app is stretched across a tablet in landscape anyway. A temporary manifest property, PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY, opts out, but not for apps that target API 37. BookNest's app.json asks for "orientation": "portrait", and on the widened emulator of Dimensions its window still grew to 761.9 dp, a medium-class width, without restarting. For decisions that really are about hardware, Platform.isPad and expo-device's deviceType (expo-device) report the device class.