File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,15 @@ from a [`StorageReference`][storage-reference] and display it using the popular
12
12
[ Glide] [ glide ] library. This technique allows you to get all of Glide's performance
13
13
benefits while leveraging Cloud Storage's authenticated storage capabilities.
14
14
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 ` :
16
24
17
25
``` java
18
26
@GlideModule
@@ -27,7 +35,12 @@ public class MyAppGlideModule extends AppGlideModule {
27
35
}
28
36
```
29
37
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 ` :
31
44
32
45
``` java
33
46
// Reference to an image file in Cloud Storage
You can’t perform that action at this time.
0 commit comments