multiple screen resolutions


Last Updated:

  1. lms5400

    lms5400 Member This Topic's Starter

    Joined:
    Apr 28, 2010
    Messages:
    15
    Likes Received:
    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.
     

    Advertisement
  2. Acchao

    Acchao Active Member

    Joined:
    Sep 29, 2009
    Messages:
    34
    Likes Received:
    1
    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.
     
  3. lms5400

    lms5400 Member This Topic's Starter

    Joined:
    Apr 28, 2010
    Messages:
    15
    Likes Received:
    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
     
  4. lms5400

    lms5400 Member This Topic's Starter

    Joined:
    Apr 28, 2010
    Messages:
    15
    Likes Received:
    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 (Text):
    1.  
    2. <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" android:maxSdkVersion="4" />
    3.              
    4.     <supports-screens
    5.           android:largeScreens="true"
    6.           android:normalScreens="true"
    7.           android:smallScreens="false"
    8.           android:anyDensity="true"/>
    9.  
    10.  
    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.
     
  5. nuvornapps

    nuvornapps Member

    Joined:
    Sep 2, 2012
    Messages:
    5
    Likes Received:
    1
    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
     

Share This Page

Loading...