0
폭을 채우고 약 200dp 높이의 이미지에 정사각형 이미지 (즉, 약 315dp x 315dp)를 확대하는 데 문제가 있습니다.정사각형 이미지 뷰를 사각형 이미지 뷰로 올바르게 스케일하는 방법은 무엇입니까?
기본적으로 이미지의 가로 세로 비율을 더 직사각형 모양으로 조정하면 가로 세로 비율이 올바르게 유지됩니다. 어떤 아이디어?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ImageView
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
</LinearLayout>