Skip to content

Commit ba9167d

Browse files
authored
Improve storage docs (#1011)
Fixes #971
1 parent 262d7f2 commit ba9167d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

storage/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ from a [`StorageReference`][storage-reference] and display it using the popular
1212
[Glide][glide] library. This technique allows you to get all of Glide's performance
1313
benefits while leveraging Cloud Storage's authenticated storage capabilities.
1414

15-
To load an image from a `StorageReference`, first register in your `AppGlideModule`:
15+
If you're not already using Glide in your application, add the following dependencies
16+
to your `app/build.gradle` file:
17+
18+
```groovy
19+
compile 'com.github.bumptech.glide:glide:4.1.1'
20+
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'
21+
```
22+
23+
To load an image from a `StorageReference`, first register an `AppGlideModule`:
1624

1725
```java
1826
@GlideModule
@@ -27,7 +35,12 @@ public class MyAppGlideModule extends AppGlideModule {
2735
}
2836
```
2937

30-
Then you can load a `StorageReference` into an `ImageView`:
38+
The class `MyAppGlideModule` can live anywhere in your source directory and is
39+
processed by the Glide annotation processor at compile time in order to create
40+
the `GlideApp` class.
41+
42+
Once you have created an `AppGlideModule` class and done a clean build,
43+
you can use `GlideApp` to load a `StorageReference` into an `ImageView`:
3144

3245
```java
3346
// Reference to an image file in Cloud Storage

0 commit comments

Comments
 (0)