Your app should be able to run on different Android-powered devices with different form factors, including phones, tablets, foldables, and Chrome OS. Here's what you need to know to build apps that work seamlessly across the Android ecosystem.
Basics
Familiarize yourself with our guidelines for tablet quality and Material design responsive UI. These documents describe the principles used to implement responsive layouts.
Handling large screens
At a minimum, your app should be able to gracefully adapt its display layout to comfortably fit whatever screen it's running on.
- Support different screen sizes: Android devices come in all shapes and sizes, so your app's layout needs to be flexible. That is, instead of defining your layout with rigid dimensions that assume a certain screen size and aspect ratio, your layout should gracefully respond to different screen sizes and orientations.
Responding to state transitions
Your app's windows can change sizes while they are being used. For example, it could be running on a Chrome OS device that allows multiple apps running in windows whose dimensions could dynamically change; or on a hinged foldable device that allows different folded poses.
- Multi-window support describes how to support your app in split-screen and picture-in-picture modes.
- The Jetpack WindowManager library and the Window metrics API help you lay out your content.
- Building apps for foldables shows how to support foldable devices.
Handling free-form multi-window and input device actions
Some user actions require your app to respond to dynamically changing states, such as window resizing and mouse tracking.
- Chrome OS devices explains how to handle multiple windows.
- Chrome input compatibility provides advice on supporting mouse and trackpad input.