• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps multiple screen resolutions

lms5400

Newbie
Apr 28, 2010
15
0
i have completed my app for the 320x480 size and i don't give two cents about dpi or density, but i want this to work on the larger formats to and i have new artwork for those resolutions for my entire app. Is there an elegant way to set up my xml layouts and artwork around resolution only? In other words a "normal" screen size could be 320x480 or it could also be 400x800 or 400x856 depending on the dpi. I guess what i want to know is if i can do this
res/layout-small-mdpi/my_layout.xml

where it specifically applies to only small normal screens with medium density?

Also, how to i account for the 800 vs 854 height difference when clearly xml identifiers won't tell these two apart? My app does not use a lot of relative layout components as it is very heavy on the sprites which obviously have fixed 2D dimensions

Any direction or advice would be great.
 
Hi Lms5400,

The android sdk site has a page devoted specifically to this topic: Supporting Multiple Screens | Android Developers

So yes you can make a folder designated to small screens and mdpi. This just becomes a tedious process to make a custom design for each resolution.

You really should care about the dpi of your application because the quality/size of your graphics will vary considerably from a mdpi to a hdpi phone.

I'm not really sure what kind of app you're making, but there should be a way to take advantage of RelativeLayouts more.
 
Upvote 0
I'm just getting started with this and i can't get it to work. I have a "layout-large" folder but it keeps using my xml file in my "layout" with a 1.6 simulator in 400x800 by 160dpi, is there anything else needed to be done other than create the folder, ensure 4 is the target and add
<supports-screens
android:largeScreens="true" ......

in the manifest?

I read that documentation cover to cover but there is no tutorial with specific steps 1,2,3... to do this.
thx
 
Upvote 0
still stuck, has anyone actually made an app that works in two different resolutions using the same app? Android will not use anything other than what is in my base "layout" and "drawable" folders, my qualifiers just don't work at all

My manifest contains these elements

Code:
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" android:maxSdkVersion="4" />
             
    <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="false"
          android:anyDensity="true"/>

My target build is also set to android 1.6

"layout-large" folder is totally ignored when i run it in a 400x800 sim at 160dpi, it uses my xml layouts in "layout". Perhaps i don't understand how this works.
 
Upvote 0
i have completed my app for the 320x480 size and i don't give two cents about dpi or density, but i want this to work on the larger formats to and i have new artwork for those resolutions for my entire app. Is there an elegant way to set up my xml layouts and artwork around resolution only? In other words a "normal" screen size could be 320x480 or it could also be 400x800 or 400x856 depending on the dpi. I guess what i want to know is if i can do this
res/layout-small-mdpi/my_layout.xml

where it specifically applies to only small normal screens with medium density?

Also, how to i account for the 800 vs 854 height difference when clearly xml identifiers won't tell these two apart? My app does not use a lot of relative layout components as it is very heavy on the sprites which obviously have fixed 2D dimensions

Any direction or advice would be great.

The way that worked for me was resizing the bitmaps at run time knowing the screen size and resolution where the application is running.

For more information check this article please:

Nuvorn Apps's Blog
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones