Android/UI
ImageView
parkho79
2019. 8. 6. 10:33
728x90
ImageView 는 image file 을 보여주기 위해 사용한다.
Image file 을 다양한 Android 단말의 화면 크기에 맞추기 위해서는 scaleType 을 잘 알아야 한다.
[Android/UI] - ImageView scaleType
How to
◼ ImageView code in XML
◼ ImageView code in JAVA
Attributes
◼ id
id 는 해당 ImageView 을 유일하게 식별할 수 있는 속성이다.
◼ src
ImageView 에 표시할 image 를 설정한다.
◼ background
ImageView 의 배경색을 설정한다.
- color 값이나 drawable 을 설정할 수 있다.
◼ padding
ImageView 의 왼쪽, 오른쪽, 위, 아래 padding 을 설정한다.
◼ scleType
ImageView 안에 image 의 크기를 확대, 축소 하거나 이동시킬 수 있는 속성이다.
상세한 사항은 하단 link 를 참조하자.
[Android/UI] - ImageView scaleType
728x90