Releases: google/accompanist
v0.3.1
Built to work with Jetpack Compose v1.0.0-alpha05
What’s Changed
- Fix PicassoImage not maintaining aspect ratio when resizing (#121) @chrisbanes
- Enable Kotlin's explicit strict API mode (#117) @chrisbanes
- Remove Compose compiler plugin workaround (#116) @chrisbanes
- Fix a variable name (#114) @skydoves
- Update to snapshot 6901934. (#115) @nickbutcher
- Update to Compose SNAPSHOT 6891475 (#111) @chrisbanes
- Update AndroidDrawablePainter (#110) @chrisbanes
- Update to Compose SNAPSHOT 6886729 (#108) @chrisbanes
- Update to AGP 4.2.0-alpha13 and Kotlin 1.4.10 (#109) @chrisbanes
- Fix a small typo (#106) @skydoves
v0.3.0
Built to work with Jetpack Compose v1.0.0-alpha04
What’s Changed
A big release for Accompanist! 😅
New Picasso (and Image Loading Core) library
We now have a new Picasso integration library 🖌 (#98)
dependencies {
implementation "dev.chrisbanes.accompanist:accompanist-picasso:0.3.0"
}
All of the common/utility code from the Coil integration library has been extracted to a new Image Loading Core library (which both depend on) (#96).
The new @Composable fun PicassoImage()
provides (mostly) the same functionality as CoilImage
.
This is primarily for apps which are already using Picasso and don't want to switch to Coil. We plan on also adding an integration for Glide too but ran out of time for this release (PRs welcome if anyone wants to take this on).
GIF support in Coil
We now have a new way to display Android Drawable
s in Compose, which also supports animated drawables. This means that we can now properly support Coil’s GIF support.
API updates
We've been busy refining the API for both the Coil and Picasso libraries:
API: Function overloads
Each library now provides two different types of 'image loading' function. If we use the CoilImage
functions as examples:
1: Simple option
This is what most developers will use (I think). We provide a number of content slots parameters, where you can provide different content whilst the image is loading/failed. We also provide a simple fadeIn
parameter allowing you to turn on the default animation.
CoilImage(
data = "https://www.image.url",
fadeIn = true,
loading = {
Stack(Modifier.fillMaxSize()) {
CircularProgressIndicator(Modifier.align(Alignment.Center))
}
},
error = { /* TODO */ },
)
2: Manual, with more control
This option allows you to provide custom layout to display the resulting image load result.
CoilImage(
data = "https://www.image.url",
) { imageState ->
when (imageState) {
is ImageLoadState.Success -> {
MaterialLoadingImage(painter = imageState.painter)
}
is ImageLoadState.Error -> // TODO
ImageLoadState.Loading -> // TODO
ImageLoadState.Empty -> // TODO
}
}
PicassoImage
has the equivalent functions as these.
API: New MaterialLoadingImage
composable
We've extracted the functionality behind CoilImageWithCrossfade
into a new composable called MaterialLoadingImage
. The API is similar to Image
with parameters for controlling the animation.
API: CoilImageWithCrossfade
is deprecated
With the new fadeIn
parameter, and MaterialLoadingImage
we can now deprecate the old CoilImageWithCrossfade
. 🗑️
API: New requestBuilder
parameters
Both CoilImage
& PicassoImage
now provide a lambda parameter allowing you to customize the relevant loading request:
PicassoImage(
data = "https://www.image.url",
requestBuilder = {
rotate(90f)
}
)
API: Package name changes
Because we've moved a load of common code out to the new Image Loading Core, the package name for these functions/classes has changed. Few developers would have been using these, but if you were, they've moved to dev.chrisbanes.accompanist.imageloading
.
All PRs
- Try fixing flakey
PicassoTest.loading_slot
(#104) @chrisbanes - Doc fixes (#103) @chrisbanes
- Update README.md (#101) @samizerouta
- Picasso integration library (#98) @chrisbanes
- Image Loading Core library (#96) @chrisbanes
- Update to snapshot 6860046 (#97) @nickbutcher
- Update to Coil 1.0.0-rc3 (#95) @chrisbanes
- More API changes (#93) @chrisbanes
- Update to Compose SNAPSHOT 6854728 (#94) @chrisbanes
- Refactor crossfade APIs (#89) @chrisbanes
- Update to Coil 1.0.0-rc2 (#91) @chrisbanes
- Use Dokka 1.4.0 (#90) @chrisbanes
- API updates (#88) @chrisbanes
- Add doc to help maintainers update this library (#87) @chrisbanes
- Update to Compose SNAPSHOT 6838769 (#85) @chrisbanes
- Bump snapshot version to Compose 6834837 build (#83) @yrezgui
- Improve Gradle caching in Actions (#82) @chrisbanes
v0.2.2
Built to work with Jetpack Compose v1.0.0-alpha03
v0.2.1
Built to work with Jetpack Compose v0.1.0-alpha02
What’s Changed
- Update to Compose 1.0.0-alpha02 (#71) @chrisbanes
- Fix grammatical errors (#68) @androiddevnotes
v0.2.0
Built to work with Jetpack Compose v0.1.0-alpha01
What’s Changed
- v0.2.0! (#67) @chrisbanes
- Update to Compose snapshot 6765009 (#66) @chrisbanes
- Update to Coil v1.0.0-rc1 (#64) @chrisbanes
- Remove MDC library (#65) @chrisbanes
v0.1.9
Built to work with Jetpack Compose v0.1.0-dev17
Breaking changes
With the update to Coil v0.12.0, all APIs which accepted a GetRequest
now accept an ImageRequest
What’s Changed
- Upgrade to Coil v0.12.0 (#63) @chrisbanes
- Upgrade to Kotlin 1.4.0 (#62) @handstandsam (Thanks Sam!)
- Fix using CoilImage with an implicit size (#61) @chrisbanes
- Update to Compose snapshot 6759487 (#60) @chrisbanes
- Update to Compose snapshot #6752477 (#59) @chrisbanes
- Try out probot-auto-merge (#58) @chrisbanes
- Update to Compose snapshot 6745209 (#57) @chrisbanes
v0.1.8
Built to work with Jetpack Compose v0.1.0-dev16
What’s Changed
- Add Coil LazyColumn sample (#52) @chrisbanes
- Go back to JDK 1.8 on Actions (#50) @chrisbanes
- Misc improvements (#48) @chrisbanes
v0.1.7
Built to work with Jetpack Compose v0.1.0-dev15
What’s Changed
- Compose v0.1.0-dev15 (#45) @chrisbanes
- Update to SNAPSHOT: 6695716 (#44) @chrisbanes
- Updating snapshot (#43) @chrisbanes
- Stop refetching on every size change by default (#40) @chrisbanes
- Update gradle-maven-publish-plugin to 0.12.0 (#41) @chrisbanes
- Upgrade to AGP 4.2.0-alpha04 (#39) @chrisbanes
- Update to Compose SNAPSHOT #6658922 (#38) @chrisbanes
- Fix CoilImage not refreshing if data changes (#35) @chrisbanes
- Update to AGP 4.2.0-alpha03 (#37) @chrisbanes
- Call prepareToDraw() to pre-upload Bitmaps to GPU (#36) @chrisbanes
v0.1.6
Built to work with Jetpack Compose v0.1.0-dev14
What’s Changed
- Move away from using
WithConstraints
(#30) @chrisbanes - Improve MDC theme assertion (#33) @ricknout
- Update to AGP 4.2.0-alpha01 & Gradle 6.5 (#31) @chrisbanes
- Update main branch refs (#29) @chrisbanes
v0.1.5
Built to work with Jetpack Compose v0.1.0-dev13
What’s Changed
- Upgrade to Compose/UI v0.1.0-dev13 (#26) @chrisbanes