1
레이아웃에 요소 (버튼, 이미지, ...)가있는 애플리케이션이 있습니다. 모든 이미지는 ldpi, mdpi, ..., xxhdpi 용 리소스에 있습니다. 태블릿에서 애플리케이션을 실행하면 7 인치 (800x480) 요소가 "올바른 크기"로 표시되지만 Samsung Galaxy S3 mini 4 (화면 크기 480x800)에서 애플리케이션을 실행하면 요소가 너무 커집니다.화면 밀도가 높은 기기의 큰 요소
어떻게 자동으로 요소의 크기를 줄일 수 있습니까? 나는이 라인들을 매니페스트에 삽입하려했지만, 성공하지 못했습니다. 여기
<supports-screens android:xlargeScreens="true" android:smallScreens="true" android:largeScreens="true" android:normalScreens="true"
android:resizeable="true" />
편집 은 이미지입니다.
잘못
좋은
출처 :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right" >
<ImageButton
android:id="@+id/btnremove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/close"
android:onClick="btnRemoveSong"
android:contentDescription="@string/remove"
android:layout_marginRight="20dp" />
<ImageButton
android:id="@+id/btnUp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/move_up"
android:onClick="moveUp"
android:src="@drawable/up" />
<ImageButton
android:id="@+id/btnDown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/down"
android:contentDescription="@string/move_down"
android:onClick="moveDown"
android:layout_marginRight="20dp" />
<TextView
android:id="@+id/txvCurrentSong"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:singleLine="true"
android:text="@string/play_with"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<ListView
android:id="@+id/listMP3"
android:layout_width="match_parent"
android:layout_height="0dp"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:layout_weight="1" >
</ListView>
<SeekBar
android:id="@+id/progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageButton
android:id="@+id/btnBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_backward"
android:contentDescription="@string/backward"
android:onClick="backward"
android:layout_marginRight="10dp" />
<ImageButton
android:id="@+id/btnPlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_play"
android:contentDescription="@string/play"
android:onClick="playPause"
android:layout_marginRight="10dp" />
<ImageButton
android:id="@+id/btnStop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_stop"
android:contentDescription="@string/stop"
android:onClick="stop"
android:layout_marginRight="10dp" />
<ImageButton
android:id="@+id/btnForward"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_forward"
android:contentDescription="@string/forward"
android:onClick="forward"
android:layout_marginRight="20dp" />
<TextView
android:id="@+id/txvProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:singleLine="true"
android:text="@string/play_status"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
당신의 문제를 설명하는 스크린 샷을 자유롭게 게시하십시오. 또한 원하는대로 작동하지 않는 코드 (예 : 레이아웃 리소스)를 자유롭게 게시하십시오. – CommonsWare
당신은 레이아웃 - 대형 레이아웃 - xlarge와 같은 특정 스크린을위한 레이아웃을 디자인하여 시도 할 수 있습니다. layout600w와 같은 특정 스크린을 위해 디자인 할 수있는 옵션이 있습니다. – itsrajesh4uguys
레이아웃 - 큰 폴더 및 400X800 화면 크기는 hdpi 또는 xhdpi 폴더가 아닌 mdpi 폴더의 이미지 만 읽으므로 레이아웃이 화면에서 크게 보입니다. – itsrajesh4uguys