Fix issue with gif
This commit is contained in:
parent
472cc5fa70
commit
0f87d71ba7
|
@ -120,7 +120,7 @@ dependencies {
|
||||||
implementation "ch.acra:acra-notification:$acraVersion"
|
implementation "ch.acra:acra-notification:$acraVersion"
|
||||||
implementation 'com.github.stom79:Android-WYSIWYG-Editor:3.2.1'
|
implementation 'com.github.stom79:Android-WYSIWYG-Editor:3.2.1'
|
||||||
implementation 'com.github.duanhong169:colorpicker:1.1.6'
|
implementation 'com.github.duanhong169:colorpicker:1.1.6'
|
||||||
|
implementation 'com.github.penfeizhou.android.animation:gif:1.0.0'
|
||||||
implementation 'com.github.penfeizhou.android.animation:glide-plugin:1.0.1'
|
implementation 'com.github.penfeizhou.android.animation:glide-plugin:1.0.1'
|
||||||
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
|
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,8 @@ import android.provider.OpenableColumns;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.browser.customtabs.CustomTabsIntent;
|
import androidx.browser.customtabs.CustomTabsIntent;
|
||||||
|
|
||||||
|
import com.github.penfeizhou.animation.glide.AnimationDecoderOption;
|
||||||
import com.google.android.material.navigation.NavigationView;
|
import com.google.android.material.navigation.NavigationView;
|
||||||
import androidx.exifinterface.media.ExifInterface;
|
import androidx.exifinterface.media.ExifInterface;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
@ -3122,6 +3124,8 @@ public class Helper {
|
||||||
Glide.with(imageView.getContext())
|
Glide.with(imageView.getContext())
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
.load(url)
|
.load(url)
|
||||||
|
.thumbnail(0.1f)
|
||||||
|
.set(AnimationDecoderOption.DISABLE_ANIMATION_GIF_DECODER, true)
|
||||||
//.apply(new RequestOptions().transforms(new CenterCrop(), new RoundedCorners(10)))
|
//.apply(new RequestOptions().transforms(new CenterCrop(), new RoundedCorners(10)))
|
||||||
.listener(new RequestListener<Drawable>() {
|
.listener(new RequestListener<Drawable>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -3130,7 +3134,6 @@ public class Helper {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) {
|
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) {
|
||||||
e.printStackTrace();
|
|
||||||
if( MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || BaseMainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
|
if( MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || BaseMainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
|
||||||
Glide.with(imageView.getContext())
|
Glide.with(imageView.getContext())
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
|
|
Loading…
Reference in New Issue