-2
나중에 임의의 크기의 이미지가 포함될 이미지 뷰가 있습니다 이미지 뷰를 이미지로 채우고 싶지만 그 비율을 유지하려면 입니다. 따라서 크기 조정 유형 인 FITXY 또는 centercrop 내 이미지의 일부가 자르기 때문에)임의의 크기의 이미지를 ImageView에 맞 춥니 다
어떻게하면됩니까? 이 테스트 코드에서
, 나는 매트릭스 내 화면의 높이/폭 해결 왼쪽과 내 이미지<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/imgTest"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/test"
/>
몇 마디 f 설명이 좋았을거야. – Najzero