2011-08-25 8 views
1

내 모든 이미지를 drawable-hdpi 폴더에 사용했습니다. 내 레이아웃이 크기가 다른 내 에뮬레이터를 제대로 산출하지 못하는 이유는 무엇입니까? 나는 그림에 따라이 오류에 직면했다.Android 복수 화면 지원 문제

또한 다음 코드를 매니페스트 파일에 포함 시켰습니다. 여기

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

안드로이드 : anyDensity는 = "false"로 허위 사실을 모두 확인하지만 변화하지 수, 또한이 크기 조정 사용 : 사실과 안드로이드 : smallScreens = "false"로도 사용하지만, 어떤 변화를 가져올 수 없습니다. 내 모든 이미지는 96dpi 해상도이고 기본 배경 이미지 크기는 480 * 800이며 hdpi (WVGA800)의 일반 화면입니다. 그래서 내 문제는 무엇인지 찾아 내 도와주세요. 미리 감사드립니다.

편집 됨 :

<?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> 
+0

해당 활동의 XML 레이아웃을 표시하십시오. – Blundell

+0

편집 된 질문을 참조하십시오. –

답변

1

모든 이미지를 드로어 블 폴더로 사용한 다음 모든 이미지를 가져옵니다. 이 레이아웃을 선형이 아닌 상대 레이아웃에 사용하고 모든 속성을 만듭니다. 아래쪽과 위쪽의 여백을 건너 뜁니다. alignparentcenter에있는 첫 번째 이미지는 사실이며 그 중심 이미지 아래 또는 위에 있습니다. 그 위의 나의 레이아웃을 잘 작동합니다.

0

난 당신이 buttom의에서 뒤로 버튼을 보여 RelativeLayout을 뭐지 가정합니다. 이와 같이 충분한 공간이 없으면 메뉴 버튼 위로 마우스를 가져갈 수 있습니다. 메뉴 버튼 'LinearLayout에 뒤로 버튼을 추가하는 것이 좋습니다.

이미지의 크기를 조정하려면 9 패치 드로어 블 사용을 고려하십시오.