What is Composable Images?
The Composable Images is a library providing Jetpack Compose wrapper for Coil, Glide, and Picasso.
Installation
Requirements
- Android 5.0+ Lollipop (API level 21)
Repository
repositories {
jcenter()
}
Coil
Fordependencies {
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)
)
}
Glide
Fordependencies {
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())
Picasso
Fordependencies {
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)
}
Development
Setup
Things you will need
- Linux, Mac OS X, or Windows.
- Android Studio (Preview)
- npm
$ npm install
Build
$ ./gradlew assemble
Formatting
$ ./gradlew ktlint
Bintray
Publishing to$ ./gradlew clean install build
$ ./gradlew bintrayUpload -PbintrayUser=******** -PbintrayKey=***************