diff --git a/app/build.gradle b/app/build.gradle index a0d8e2bc9..f04c03596 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -107,9 +107,9 @@ dependencies { implementation 'androidx.media:media:1.6.0' implementation 'cat.ereza:customactivityoncrash:2.4.0' implementation 'com.github.bassaer:materialdesigncolors:1.0.0' - implementation 'com.github.bumptech.glide:glide:4.15.1' - implementation 'com.github.bumptech.glide:annotations:4.15.1' - implementation 'com.github.bumptech.glide:okhttp3-integration:4.15.1' + implementation 'com.github.bumptech.glide:glide:4.16.0' + implementation 'com.github.bumptech.glide:annotations:4.16.0' + implementation 'com.github.bumptech.glide:okhttp3-integration:4.16.0' implementation 'com.github.jahirfiquitiva:TextDrawable:1.0.3' implementation 'com.github.TeamNewPipe:NewPipeExtractor:289db1178ab66694c23893e6a487d4708343c47b' implementation('com.github.thegrizzlylabs:sardine-android:0.8') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' } @@ -139,5 +139,5 @@ dependencies { //mobileImplementation 'com.google.android.gms:play-services-cast-framework:21.3.0' mobileImplementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false } annotationProcessor 'androidx.room:room-compiler:2.6.1' - annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1' + annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0' } \ No newline at end of file diff --git a/app/src/main/java/com/fongmi/android/tv/utils/ImgUtil.java b/app/src/main/java/com/fongmi/android/tv/utils/ImgUtil.java index 6ae8eb26c..96bdb58d1 100644 --- a/app/src/main/java/com/fongmi/android/tv/utils/ImgUtil.java +++ b/app/src/main/java/com/fongmi/android/tv/utils/ImgUtil.java @@ -9,6 +9,7 @@ import android.text.TextUtils; import android.view.View; import android.widget.ImageView; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.bumptech.glide.Glide; @@ -124,14 +125,14 @@ public class ImgUtil { private static RequestListener getListener(ImageView view, ImageView.ScaleType scaleType) { return new RequestListener<>() { @Override - public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) { + public boolean onLoadFailed(@Nullable GlideException e, Object model, @NonNull Target target, boolean isFirstResource) { view.setScaleType(scaleType); view.setImageResource(R.drawable.ic_img_error); return true; } @Override - public boolean onResourceReady(Bitmap resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) { + public boolean onResourceReady(@NonNull Bitmap resource, @NonNull Object model, Target target, @NonNull DataSource dataSource, boolean isFirstResource) { view.setScaleType(ImageView.ScaleType.CENTER_CROP); return false; }