Skip to content

Commit d226cc7

Browse files
committed
Fixed Android “compile” warning and upgraded to latest Glide API
1 parent 71c0661 commit d226cc7

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

android/build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,17 @@ repositories {
3737
}
3838

3939
dependencies {
40-
compile 'com.facebook.react:react-native:+'
40+
implementation 'com.facebook.react:react-native:+'
4141

4242
// glide dependencies
43-
compile 'com.github.bumptech.glide:glide:4.2.0'
44-
annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
43+
implementation 'com.github.bumptech.glide:glide:4.2.0'
4544

4645
// FirebaseUI Storage only
47-
compile 'com.firebaseui:firebase-ui-storage:3.0.0'
46+
implementation 'com.firebaseui:firebase-ui-storage:3.0.0'
4847

4948
// PhotoView
50-
compile 'com.github.chrisbanes:PhotoView:2.1.3'
49+
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
5150

5251
// glide-transformations
53-
compile 'jp.wasabeef:glide-transformations:3.0.1'
52+
implementation 'jp.wasabeef:glide-transformations:3.0.1'
5453
}

android/src/main/java/io/rumors/reactnativefirebaseui/storage/ExtendedImageView.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
2323
import com.bumptech.glide.load.MultiTransformation;
2424
import com.bumptech.glide.signature.MediaStoreSignature;
25-
import static com.bumptech.glide.request.RequestOptions.bitmapTransform;
25+
import com.bumptech.glide.request.RequestOptions;
2626

2727
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
2828
import jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
@@ -85,12 +85,12 @@ public void updateView() {
8585

8686
MultiTransformation multi = new MultiTransformation<>(transformationsArray);
8787

88-
GlideApp.with(mContext)
88+
Glide .with(mContext)
8989
.load(storageReference)
90-
.placeholder(mDefaultImageDrawable)
91-
.apply(bitmapTransform(multi))
90+
.apply(new RequestOptions().placeholder(mDefaultImageDrawable))
91+
.apply(new RequestOptions().bitmapTransform(multi))
9292
//(String mimeType, long dateModified, int orientation)
93-
.signature(new MediaStoreSignature("", mTimestamp, 0))
93+
.apply(new RequestOptions().signature(new MediaStoreSignature("", mTimestamp, 0)))
9494
.into(this);
9595
}
9696
}

android/src/main/java/io/rumors/reactnativefirebaseui/storage/ExtendedPhotoView.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
2323
import com.bumptech.glide.load.MultiTransformation;
2424
import com.bumptech.glide.signature.MediaStoreSignature;
25-
import static com.bumptech.glide.request.RequestOptions.bitmapTransform;
25+
import com.bumptech.glide.request.RequestOptions;
2626

2727
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
2828
import jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
@@ -84,12 +84,12 @@ public void updateView() {
8484
Transformation[] transformationsArray = transformations.toArray(new Transformation[transformations.size()]);
8585
MultiTransformation multi = new MultiTransformation<>(transformationsArray);
8686

87-
GlideApp.with(mContext)
87+
Glide.with(mContext)
8888
.load(storageReference)
89-
.placeholder(mDefaultImageDrawable)
90-
.apply(bitmapTransform(multi))
89+
.apply(new RequestOptions().placeholder(mDefaultImageDrawable))
90+
.apply(new RequestOptions().bitmapTransform(multi))
9191
//(String mimeType, long dateModified, int orientation)
92-
.signature(new MediaStoreSignature("", mTimestamp, 0))
92+
.apply(new RequestOptions().signature(new MediaStoreSignature("", mTimestamp, 0)))
9393
.into(this);
9494
}
9595
}

0 commit comments

Comments
 (0)