Skip to content

Commit

Permalink
Update README and prepare for the next release
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Nov 12, 2022
1 parent be595bc commit 99f7e02
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 9 deletions.
43 changes: 37 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repositories {
Next, add the dependency below to your **module**'s `build.gradle` file:
```gradle
dependencies {
implementation "com.github.skydoves:landscapist-glide:2.0.4-SNAPSHOT"
implementation "com.github.skydoves:landscapist-glide:2.1.1-SNAPSHOT"
}
```
</details>
Expand All @@ -72,7 +72,7 @@ allprojects {
Next, add the dependency below to your **module**'s `build.gradle` file:
```gradle
dependencies {
implementation "com.github.skydoves:landscapist-glide:2.0.3"
implementation "com.github.skydoves:landscapist-glide:2.1.0"
}
```

Expand Down Expand Up @@ -345,20 +345,19 @@ FrescoImage(
```

### LocalFrescoImageRequest
You can pass the same instance of your `ImageRequest` down through the Composition in your composable hierarchy as following the example below:
You can pass the same instance of your `imageRequestBuilder` down through the Composition in your composable hierarchy as following the example below:

```kotlin
// customize the ImageRequest as needed
val imageRequest = ImageRequestBuilder
val imageRequestBuilder = ImageRequestBuilder
.newBuilderWithSource(uri)
.setImageDecodeOptions(decodeOptions)
.setLocalThumbnailPreviewsEnabled(true)
.setLowestPermittedRequestLevel(RequestLevel.FULL_FETCH)
.setProgressiveRenderingEnabled(false)
.setResizeOptions(ResizeOptions(width, height))
.build()

CompositionLocalProvider(LocalFrescoImageRequest provides imageRequest) {
CompositionLocalProvider(LocalFrescoImageRequest provides imageRequestBuilder) {
// This will automatically use the value of current ImageRequest in the hierarchy.
FrescoImage(
imageUrl = ...
Expand Down Expand Up @@ -415,6 +414,17 @@ GlideImage(
)
```

### RequestSize

You can set the request size of your image by giving `requestSize` property as seen in the below:

```kotlin
GlideImage(
..
imageOptions = ImageOptions(requestSize = IntSize(800, 600)),
)
```

## Listening image state changes

You can listen the image state changes by giving `onImageStateChanged` parameter to your image composable functions like the below:
Expand Down Expand Up @@ -783,6 +793,27 @@ GlideImage( // CoilImage, FrescoImage also can be used.
```
> **Note**: You can also use the Palette for **`CoilImage`** and **`FrescoImage`**.
## BOM

[![Maven Central](https://img.shields.io/maven-central/v/com.github.skydoves/landscapist.svg?label=Maven%20Central)](https://search.maven.org/search?q=landscapist)<br>

The landscapist Bill of Materials (BOM) lets you manage all of your landscapist library versions by specifying only the BOM’s version.

```groovy
dependencies {
// Import the landscapist BOM
implementation platform("com.github.skydoves:landscapist-bom:$version")
// Import landscapist libraries
implementation "com.github.skydoves:landscapist-glide" // fresco or coil
implementation "com.github.skydoves:landscapist-placeholder"
implementation "com.github.skydoves:landscapist-palette"
implementation "com.github.skydoves:landscapist-transformation"
}
```

[![Maven Central](https://img.shields.io/maven-central/v/com.github.skydoves/landscapist.svg?label=Maven%20Central)](https://search.maven.org/search?q=landscapist)<br>

## Who's using Landscapist?
If your project uses Landscapist, please let me know by creating a new issue! 🤗

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ object Configuration {
const val targetSdk = 33
const val minSdk = 21
const val majorVersion = 2
const val minorVersion = 0
const val patchVersion = 3
const val minorVersion = 1
const val patchVersion = 0
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 59
const val versionCode = 60
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "com.github.skydoves"
}

0 comments on commit 99f7e02

Please sign in to comment.