https://coil-kt.github.io/coil/
https://coil-kt.github.io/coil/getting_started/
https://velog.io/@jojo_devstory/Android-이미지-로딩-라이브러리-Coil-을-알아보자
https://jaeyeong951.medium.com/android-coil-안드로이드-image-loader-e989aaa95ce5
2023-01-04: 2.2.2
Coil is available on mavenCentral().
implementation("io.coil-kt:coil:2.2.2")
ImageView에 로딩
Coil의 load() 확장 메소드 사용
ImageView에 이미지를 불러오는 기능 수행
ex)
// URL
imageView.load("https://www.example.com/image.jpg")
// File
imageView.load(File("/path/to/image.jpg"))
// resource
imageView.load(R.drawable.image)
// CircleCropTransformation() -> image 원형으로 crop
imageView.load("https://www.example.com/image.jpg") {
crossfade(true) // fade in 애니메이션
placeholder(R.drawable.image) // 대체 이미지 설정
transformations(CircleCropTransformation())
}
4-type Image Transformations fea
val disposable = imageView.load("https://www.example.com/image.jpg")
// Cancel the request.
disposable.dispose()