Skip to main content
●Build AI experiences
●Build AI-powered Android apps with Gemini APIs and more.
Get started
●Get started
●Start by creating your first app. Go deeper with our training courses or explore app development on your own.
Hello world
Training courses
Tutorials
Compose for teams
Kotlin for Android
Monetization with Play ↗️
Android Developer Verification
●Extend by device
●Build apps that give your users seamless experiences from phones to tablets, watches, headsets, and more.
Adaptive apps
Android XR
Wear OS
Android for Cars
Android TV
ChromeOS
●Build by category
●Learn to build for your use case by following Google's prescriptive and opinionated guidance.
Games
Camera & media
Social & messaging
Health & fitness
Productivity
Enterprise apps
●Get the latest
●Stay in touch with the latest releases throughout the year, join our preview programs, and give us your feedback.
Latest updates
Experimental updates
Android Studio preview
Jetpack & Compose libraries
Wear OS releases
Privacy Sandbox ↗️
Design & Plan
●Excellent Experiences
●Build the best experiences for your best users.
Learn more
●UI Design
●Design a beautiful user interface using Android best practices.
Design for Android
Mobile
Adaptive UI
XR Headsets & XR Glasses
AI Glasses
Widgets
Wear OS
Android TV
Android for Cars
●Architecture
●Design robust, testable, and maintainable app logic and services.
Introduction
Libraries
Navigation
Modularization
Testing
Kotlin Multiplatform
●Quality
●Plan for app quality and align with Play store guidelines.
Overview
Core value
User experience
Accessibility
Technical quality
Excellent Experiences
●Security
●Safeguard users against threats and ensure a secure Android experience.
Overview
Privacy
Permissions
Identity
Fraud prevention
Develop
●Gemini in Android Studio
●Your AI development companion for Android development.
Learn more
Get Android Studio
●Core areas
●Get the samples and docs for the features you need.
Samples
User interfaces
Background work
Data and files
Connectivity
All core areas ⤵️
●Tools and workflow
●Use the IDE to write and build your app, or create your own pipeline.
Write and debug code
Build projects
Test your app
Performance
Command-line tools
Gradle plugin API
●Device tech
●Write code for form factors. Connect devices and share data.
Adaptive UI
Wear OS
Android XR
Android Health
Android for Cars
Android TV
All devices ⤵️
●Libraries
●Browse API reference documentation with all the details.
Android platform
Jetpack libraries
Compose libraries
Google Play services ↗️
Google Play SDK index ↗️
Google Play
●Play Console
●Publish your app or game and grow your business on Google Play.
Go to Play Console
Learn more ↗️
●Fundamentals
●Learn how to engage users, monitize, and secure your app.
Play Monetization
Play Integrity
Play Policies
Play Programs ↗️
●Games Dev Center
●Develop and deliver games. Get tools, downloads, and samples.
Overview
Play Asset Delivery
Play Games Services
Play Games on PC
All Play guides ⤵️
●Libraries
●Browse API reference documentation with all the details.
Play Feature Delivery
Play In-app Updates
Play In-app Reviews
Play Install Referrer
Google Play services ↗️
Google Play SDK index ↗️
All Play libraries ⤵️
●Tools & resources
●Tools for publishing, promoting, and managing your app.
Android App Bundles
Brand & marketing
Play Console APIs ↗️
Community
●
English
●
Deutsch
●
Español – América Latina
●
Français
●
Indonesia
●
Italiano
●
Polski
●
Português – Brasil
●
Tiếng Việt
●
Türkçe
●
Русский
●
עברית
●
العربيّة
●
فارسی
●
हिंदी
●
বাংলা
●
ภาษาไทย
●
中文 – 简体
●
中文 – 繁體
●
日本語
●
한국어
Sign in
●
Devices
Compatibility
●
Essentials
●
More
●
Design & Plan
●
More
●
Develop
●
More
●
Google Play
●
More
●
Community
●
Android Studio
●All devices ⍈
Device compatibility
●About device compatibility
●About screen compatibility
●Device compatibility mode
●Support different pixel densities
●Multiple APK support ⍈
●Support different languages and cultures
●Support different platform versions
●Filters on Google Play ⍈
●64-bit Support
●Support 16 KB page sizes
●
Build AI experiences
●
Get started
●
Get started
●
Hello world
●
Training courses
●
Tutorials
●
Compose for teams
●
Kotlin for Android
●
Monetization with Play ↗️
●
Android Developer Verification
●
Extend by device
●
Adaptive apps
●
Android XR
●
Wear OS
●
Android for Cars
●
Android TV
●
ChromeOS
●
Build by category
●
Games
●
Camera & media
●
Social & messaging
●
Health & fitness
●
Productivity
●
Enterprise apps
●
Get the latest
●
Latest updates
●
Experimental updates
●
Android Studio preview
●
Jetpack & Compose libraries
●
Wear OS releases
●
Privacy Sandbox ↗️
●
Excellent Experiences
●
Learn more
●
UI Design
●
Design for Android
●
Mobile
●
Adaptive UI
●
XR Headsets & XR Glasses
●
AI Glasses
●
Widgets
●
Wear OS
●
Android TV
●
Android for Cars
●
Architecture
●
Introduction
●
Libraries
●
Navigation
●
Modularization
●
Testing
●
Kotlin Multiplatform
●
Quality
●
Overview
●
Core value
●
User experience
●
Accessibility
●
Technical quality
●
Excellent Experiences
●
Security
●
Overview
●
Privacy
●
Permissions
●
Identity
●
Fraud prevention
●
Gemini in Android Studio
●
Learn more
●
Get Android Studio
●
Core areas
●
Samples
●
User interfaces
●
Background work
●
Data and files
●
Connectivity
●
All core areas ⤵️
●
Tools and workflow
●
Write and debug code
●
Build projects
●
Test your app
●
Performance
●
Command-line tools
●
Gradle plugin API
●
Device tech
●
Adaptive UI
●
Wear OS
●
Android XR
●
Android Health
●
Android for Cars
●
Android TV
●
All devices ⤵️
●
Libraries
●
Android platform
●
Jetpack libraries
●
Compose libraries
●
Google Play services ↗️
●
Google Play SDK index ↗️
●
Play Console
●
Go to Play Console
●
Learn more ↗️
●
Fundamentals
●
Play Monetization
●
Play Integrity
●
Play Policies
●
Play Programs ↗️
●
Games Dev Center
●
Overview
●
Play Asset Delivery
●
Play Games Services
●
Play Games on PC
●
All Play guides ⤵️
●
Libraries
●
Play Feature Delivery
●
Play In-app Updates
●
Play In-app Reviews
●
Play Install Referrer
●
Google Play services ↗️
●
Google Play SDK index ↗️
●
All Play libraries ⤵️
●
Tools & resources
●
Android App Bundles
●
Brand & marketing
●
Play Console APIs ↗️
●
Android Developers
Develop
Devices
Compatibility
Screen compatibility overview
Stay organized with collections
Save and categorize content based on your preferences.
Android runs on a variety of devices that have different screen sizes and pixel
densities. The system performs basic scaling and resizing to adapt your user
interface to different screens, but there are ways to help your UI adapt better
to each screen type.
Figure 1. Android runs on different devices that have
different screens and pixel densities.
This page provides an overview of the features available on Android to help your
app adapt accordingly. For more specific instructions about how to build your
app for different screen variations, see the following documentation:
●Support different screen sizes
●Support different pixel densities
Screen sizes
The screen size is the visible space for your app UI. The screen size, as it's
recognized by your app, isn't the actual size of the device screen. Apps must
take into account the screen orientation, system decorations—such as the
navigation bar—and window configuration changes, such as when the user
enables multi-window mode.
Flexible layouts
By default, Android resizes your app layout to fit the current screen. To help
your layout resize well for small variations in screen size, implement your
layout with flexibility in mind. Don't hardcode the position and size of your UI
components. Instead, let view sizes stretch and specify view positions relative
to the parent view or other sibling views so that your intended order and
relative sizes remain the same as the layout grows.
To learn more about flexible layouts, see Responsive design.
Alternative layouts
A flexible layout is important, but you also need to design different layouts
that optimize the user experience for the available space on different devices.
Android lets you provide alternative layout files that the system applies at
runtime based on the current device's screen size.
Figure 2. The same app uses a different layout for different
screen sizes.
To learn how to create alternative layouts, see Adaptive design.
Stretchable images
Because your layout needs to stretch to fit the current screen, so do the
bitmaps that you attach to any of the layout views. However, stretching an
ordinary bitmap in arbitrary directions can result in strange scaling artifacts
and skewed images.
To solve this, Android supports nine-patch bitmaps, in which you specify small
pixel regions that are stretchable, while the rest of the image remains
unscaled.
To learn more about nine-patch bitmaps, see NinePatch drawables.
Pixel densities
The pixel density is the number of pixels within a physical area of the screen.
It is referred to as dpi (dots per inch). This is different from the screen
resolution, which is the total number of pixels on a screen.
Figure 3. An exaggerated representation of two devices that
are the same size but have different pixel densities.
Density independence
Your app achieves "density independence" when it preserves the physical
size—from the user's point of view—of your UI design when displayed
on screens with different pixel densities, as shown in figure 3. Maintaining
density independence is important, because without it, a UI element like a
button might appear larger on a low-density screen and smaller on a high-density
screen.
Android helps you achieve density independence by providing the
density-independent pixel (dp or dip) as a unit of measurement that you use
instead of pixels (px).
To learn more about density independent pixels, see Use density-independent
pixels.
Alternate bitmaps
To make your images look their best on all screens, provide alternate bitmaps to
match each screen density. If your app provides bitmaps only for lower-density
screens, Android scales them up when on a high-density screen so that the images
occupy the same physical space on the screen. This can cause visible scaling
artifacts in bitmaps. So, your app must include alternate bitmaps at a higher
resolution.
To learn how to provide alternate bitmaps, see Provide alternative bitmaps.
Vector graphics
For simple types of images, like icons, you can avoid creating separate images
for each density by using vector graphics. Because vector graphics define the
illustration with geometric line paths instead of pixels, they can be drawn at
any size without scaling artifacts.
To learn more about using vector graphics, see Prefer vector graphics.
Wear OS, TV, Cars, and ChromeOS
The preceding recommendations apply to all Android form factors, but if you want
to build an app for Wear OS, Android TV, Android Auto, Android Automotive OS, or
ChromeOS devices, you need to do more work.
Each of these device types has its own user interaction model that your app must
accommodate. In some cases, such as for Wear OS, you need to rethink your app's
user experience and build an app that's specialized for that device. On the
other hand, to support ChromeOS devices, such as the Google Pixelbook, you
might need only slight modifications to your existing app to support keyboard or
mouse interaction and a larger screen.
To support these devices, refer to the following documentation:
●Build Wear OS apps
●Build TV apps
●Android for Cars overview
●Apps for ChromeOS overview
Foldables
Foldable devices typically have multiple displays, with different
displays—or combinations of displays—becoming active for different
states of the device folding. Follow the guidelines in this document to make
your app adapt to those changing configurations. However, some configurations
can have unusual aspect ratios, so test how your app behaves on a variety of
devices.
Figure 4. Folding and unfolding.
Usually, an app that works well in multi-window
mode for various window sizes also behaves well
on foldable devices.
To learn more about building apps for foldables, see Learn about
foldables.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-04-17 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[],[]]
Follow @AndroidDev on X
Check out Android Developers on YouTube
Connect with the Android Developers community on LinkedIn
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
English
●
Deutsch
●
Español – América Latina
●
Français
●
Indonesia
●
Italiano
●
Polski
●
Português – Brasil
●
Tiếng Việt
●
Türkçe
●
Русский
●
עברית
●
العربيّة
●
فارسی
●
हिंदी
●
বাংলা
●
ภาษาไทย
●
中文 – 简体
●
中文 – 繁體
●
日本語
●
한국어