The Composable Images is a library providing Jetpack Compose wrapper for Coil, Glide, and Picasso.
- Android 5.0+ Lollipop (API level 21)
repositories {
jcenter()
}
For Coil
dependencies {
implementation 'jp.wasabeef.composable:coil:1.x.x'
}
CoilImage(
model = "https://images.unsplash.com/photo-1588952159215-a4b39193464e",
modifier = Modifier.preferredWidth(240.dp)
) {
transformations(
BlurTransformation(context, 25f, 2f)
)
}
For Glide
dependencies {
implementation 'jp.wasabeef.composable:glide:1.x.x'
}
GlideImage(
model = "https://images.unsplash.com/photo-1588952159215-a4b39193464e",
modifier = Modifier.preferredWidth(120.dp),
options = RequestOptions().centerCrop())
For Picasso
dependencies {
implementation 'jp.wasabeef.composable:picasso:1.x.x'
}
PicassoImage(
model = "https://images.unsplash.com/photo-1588952159215-a4b39193464e",
modifier = Modifier.preferredWidth(120.dp),
) {
centerInside()
rotate(90f)
}
Things you will need
- Linux, Mac OS X, or Windows.
- Android Studio (Preview)
- npm
$ npm install
$ ./gradlew assemble
$ ./gradlew ktlint
Publishing to Bintray
$ ./gradlew clean install build
$ ./gradlew bintrayUpload -PbintrayUser=******** -PbintrayKey=***************