Create Screen Size Independent Android Applications


Last Updated:

  1. nive

    nive New Member This Topic's Starter

    Joined:
    Jul 28, 2010
    Messages:
    1
    Likes Received:
    0
    Hi All,

    I am working on android 2.2, I developed an application which is having an Image View and a button view.
    In HVGA both the image and button are visible, but in QVGA I could see only the image. Rest of the buttons that are present under the image view is not visible.

    How do I manage multi-screen resolutions in Android ?
    Is there any thing like maintaining Aspect Ratio of the image to adjust the size as well maintain clarity.

    I tried placing the buttons above the image view and it worked properly for HVGA and QVGA.
    Please let me know how can I handle the situation by placing the buttons below the image view.

    I have done it in relative layout

    Image width and height is fill_parent and wrap_content
    Button width and height is wrap_content and wrap_content.

    Thnks,
    nive
     

    Advertisement
  2. Steven58

    Steven58 Reformed PH VIP Member

    Joined:
    Feb 19, 2010
    Messages:
    32,921
    Likes Received:
    25,271
    Welcome to Android Forums! :) This is the wrong place to post this query. I will move your post to the right one for you! :)
     
  3. JiMMaR

    JiMMaR Well-Known Member

    Joined:
    Jun 12, 2010
    Messages:
    363
    Likes Received:
    57
    well , as that you are using fill_parent , wrap_contents
    I can't say exactly what's the problem , but try changing the way of the layout to relatively and use dip instead of px
    i.e
    android:layout_width="163dip"
    not
    android:layout_width="163px"
     
  4. rishi360

    rishi360 Member

    Joined:
    Jun 5, 2010
    Messages:
    12
    Likes Received:
    1
    I don't know if this is exactly what you're looking for, but I've been developing apps for the enTourage eDGe and I just add this into the manifest:

    Code (Text):
    1.       <supports-screens
    2.           android:largeScreens="true"
    3.           android:normalScreens="true"
    4.           android:smallScreens="true"
    5.           android:anyDensity="true" />
     

Share This Page

Loading...