Horrorgoogle
Horrorgoogle

Reputation: 7868

Android Multiple Screen Support Problem

I Have used my all my images in drawable-hdpi folder . why cannot my layout properly outcome my emulator with different sizes. I hava faced this error according to pictures.

I have also include following code in manifest file.

       <supports-screens 
          android:smallScreens="true"
          android:normalScreens="true"
          android:largeScreens="true"
          android:anyDensity="false"             
        />

Here android:anyDensity="false" check both false and true but could not any change, and also use Resizable: true and android:smallScreens="false" also used but could not get any change. my all images are 96dpi resolution and main background image size 480*800 for normal screen of hdpi(WVGA800). so what is the my problem please find out and help me. Thanks in advance.

Edited:

 <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:orientation="vertical" android:layout_height="fill_parent"
       android:layout_width="fill_parent" android:background="@drawable/normalbg"
         android:gravity="top">

<ImageView android:id="@+id/group1" android:background="@drawable/groupone"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:layout_alignParentRight="true" android:layout_marginRight="5dip" android:layout_marginTop="138dip"/>

<ImageView android:id="@+id/group2" android:background="@drawable/grouptwo"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:layout_alignParentRight="true" android:layout_below="@id/group1"
    android:layout_marginRight="5dip"/>

<ImageView android:id="@+id/group3" android:background="@drawable/groupthree"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:layout_alignParentRight="true" android:layout_below="@id/group2"
    android:layout_marginRight="5dip"/>

<ImageView android:id="@+id/group4" android:background="@drawable/groupfour"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:layout_alignParentRight="true" android:layout_below="@id/group3" android:layout_marginRight="7dip"/>

<LinearLayout android:orientation="horizontal"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:layout_alignParentBottom="true" android:baselineAligned="true">

    <ImageView android:id="@+id/backToLevel" android:background="@drawable/back"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:layout_alignParentRight="true" android:layout_below="@id/group4"
        android:layout_gravity="center_horizontal" android:layout_marginLeft="116dip" android:layout_marginBottom="3dip"/>

</LinearLayout>

</RelativeLayout>

Upvotes: 1

Views: 372

Answers (2)

Horrorgoogle
Horrorgoogle

Reputation: 7868

I used drawable folder all images then get the all images. I used this all layout in Relative layout rather than linear, and Make the all it properties. I skip the margin , below and above properties. First on alignparentcenter is true, then below or above the that centered image. Its work fine then the above my layout.

Upvotes: 1

Jonathan Roth
Jonathan Roth

Reputation: 1271

I assume you youse RelativeLayout to show the back button on the buttom. Like this, it may hover over the menu buttons if there isn´t enough space for it. Consider adding the back button into the menu buttons' LinearLayout.

To resize the image, consider using a 9-Patch Drawable.

Upvotes: 0

Related Questions