Skip to content

Latest commit

 

History

History
133 lines (108 loc) · 3.48 KB

README.md

File metadata and controls

133 lines (108 loc) · 3.48 KB

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()
}

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)
}

Development

Setup

Things you will need

$ npm install

Build

$ ./gradlew assemble

Formatting

$ ./gradlew ktlint

Publishing to Bintray

$ ./gradlew clean install build
$ ./gradlew bintrayUpload -PbintrayUser=******** -PbintrayKey=***************