-1

How can I create a single Android application that can handle the different screen resolutions seen on Android devices? I want my application to adapt to the different available resolutions.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179

5 Answers5

1

Please read about how to support multiple screens.

  • xlarge screens are at least 960dp x 720dp
  • large screens are at least 640dp x 480dp
  • normal screens are at least 470dp x 320dp
  • small screens are at least 426dp x 320dp
Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
raju
  • 785
  • 3
  • 14
  • 28
0

Read on Supporting Multiple Screens here.

There it is described well how to create apps to support multiple screen sizes/resolution. I think this is an essential knowledge to have for android development.

Suraj Bajaj
  • 6,630
  • 5
  • 34
  • 49
stinepike
  • 54,068
  • 14
  • 92
  • 112
0

Create folders for each display resolution:

  • small screen: res->layout-ldpi design for 240*320 resolution screen
  • medium screen: res-->layout-mdpi design for 320*480 resolution screen
  • large screen: res-->layout-hdpi design for 480*800 resolution screen

When you run your project, it automatically takes layout design from the required layout/

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
appukrb
  • 1,507
  • 4
  • 24
  • 53
0

You need to have different layout folders and drawable resources to support multiple screen sizes on Android. More on this.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
Nargis
  • 4,687
  • 1
  • 28
  • 45
0

Add below code into your Androidmanifest.xml file.

<supports-screens android:resizeable=["true"| "false"]
    android:smallScreens=["true" | "false"]
    android:normalScreens=["true" | "false"]
    android:largeScreens=["true" | "false"]
    android:xlargeScreens=["true" | "false"]
    android:anyDensity=["true" | "false"]
    android:requiresSmallestWidthDp="integer"
    android:compatibleWidthLimitDp="integer"
    android:largestWidthLimitDp="integer"/>

And see below link for more information.

Screen_Support

Dipak Keshariya
  • 22,193
  • 18
  • 76
  • 128