2013-06-21 2 views

답변

1

ImageView에 대해 layout_heightlayout_width 매개 변수와 scaleType 매개 변수를 지정하십시오. 이 뷰의 경계에 이미지의 경계를 확장하기위한

http://developer.android.com/reference/android/widget/ImageView.ScaleType.html

옵션

<ImageView 
    android:id="@+id/my_imageView" 
    android:layout_width="@dimen/my_image_width" 
    android:layout_height="@dimen/my_image_height" 
    android:scaleType="fitXY"/> 

.

+0

이되지 않은 이미지 O 이미지보기를 조정 그것과 같은 간단한 : '<이미지 뷰 안드로이드 : ID = "@ + ID/my_imageView" 안드로이드 : layout_width = " match_parent " android : layout_height ="match_parent "/>'? – g00dy

+0

@ g00dy. 그들이 'match_parent'를 원할 때만. 50dp 와이드 만 원한다면 어떨까요? –

0

사용이에 대한

imageView.setAdjustViewBounds(true); 
    imageView.setScaleType(ScaleType.FIT_CENTER); 
관련 문제