Android ImageView scaleType value

Programming/Android 2013. 4. 2. 17:19 Posted by 생각하는로뎅
반응형

Enum Values
ImageView.ScaleTypeCENTER Center the image in the view, but perform no scaling. View의 중앙에 위치. 원본크기로 나옴.
ImageView.ScaleTypeCENTER_CROP Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). 좌우나 상하중 짧은쪽 길이를 View의 크기에 맞추고 나머지 부분 잘라 버림.
ImageView.ScaleTypeCENTER_INSIDE Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). View안쪽에 들어오게 사이즈 맞춤.View보다 작으면 사이즈 변경없음
ImageView.ScaleTypeFIT_CENTER Scale the image using CENTER. View에 맞춤. 잘림없음. View보다 작은경우 확대
ImageView.ScaleTypeFIT_END Scale the image using END. 이미지의 오른쪽하단과 View의 오른쪽 하단을 기준으로 맞춘뒤 비율 유지 하고 View사이즈에 맞게 확대/축소
ImageView.ScaleTypeFIT_START Scale the image using START. END와 같으며 기준점이 왼쪽 상단이 된다.
ImageView.ScaleTypeFIT_XY Scale the image using FILL. View의 크기에 맞게 이미지 비율은 무시하고 그냥 꽉 채운다.
ImageView.ScaleTypeMATRIX Scale using the image matrix when drawing. Matrix 사용 할때 설정

반응형

'Programming > Android' 카테고리의 다른 글

Android arc of a button  (0) 2013.04.02
Android button design xml  (0) 2013.04.02
Layout 최하단 위치 시키기  (0) 2013.04.02
Android animation top - down  (0) 2013.04.02
Android Animation 효과  (0) 2013.04.02