Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Feb 6, 2020
1 parent 14433b5 commit f0fb1ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/image_loaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ New instances can be created like so:
val imageLoader = ImageLoader(context)
```

Similar to [Requests](requests.md), `ImageLoader`s can be configured with an optional trailing lambda param:
Similar to [Requests](requests.md), `ImageLoader`s can be configured by using a builder:

```kotlin
val imageLoader = ImageLoader.Builder(context)
Expand Down
13 changes: 2 additions & 11 deletions docs/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,10 @@

Requests are [value objects](https://publicobject.com/2019/06/10/value-objects-service-objects-and-glue/) that provide all the necessary information for an [ImageLoader](image_loaders.md) to execute an image request.

Requests can be created a number of ways. This simplest way is to use the trailing lambda syntax:
Requests can be created using a builder:

```kotlin
val request = LoadRequest(context, imageLoader.defaults) {
data("https://www.example.com/image.jpg")
crossfade(true)
}
```

Requests can also be created using typical builder syntax. This works best for Java:

```kotlin
val request = imageLoader.newLoadBuilder(context)
val request = LoadRequest.Builder(context, imageLoader.defaults)
.data("https://www.example.com/image.jpg")
.crossfade(true)
.build()
Expand Down

0 comments on commit f0fb1ba

Please sign in to comment.