Fix emoji not displayed
This commit is contained in:
parent
3e16d0c310
commit
b72964c851
|
@ -109,7 +109,7 @@ dependencies {
|
||||||
implementation("com.vanniktech:android-image-cropper:4.3.3")
|
implementation("com.vanniktech:android-image-cropper:4.3.3")
|
||||||
annotationProcessor "com.github.bumptech.glide:compiler:4.12.0"
|
annotationProcessor "com.github.bumptech.glide:compiler:4.12.0"
|
||||||
implementation 'jp.wasabeef:glide-transformations:4.3.0'
|
implementation 'jp.wasabeef:glide-transformations:4.3.0'
|
||||||
implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.24.0'
|
implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.23.0'
|
||||||
implementation 'com.google.android.exoplayer:exoplayer:2.18.1'
|
implementation 'com.google.android.exoplayer:exoplayer:2.18.1'
|
||||||
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
||||||
implementation 'com.github.piasy:rxandroidaudio:1.7.0'
|
implementation 'com.github.piasy:rxandroidaudio:1.7.0'
|
||||||
|
|
|
@ -94,28 +94,29 @@ public class CustomEmoji extends ReplacementSpan {
|
||||||
@Override
|
@Override
|
||||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||||
View view = viewWeakReference.get();
|
View view = viewWeakReference.get();
|
||||||
|
|
||||||
if (animate && resource instanceof Animatable) {
|
if (animate && resource instanceof Animatable) {
|
||||||
Drawable.Callback callback = resource.getCallback();
|
Drawable.Callback drawableCallBack = resource.getCallback();
|
||||||
resource.setCallback(new Drawable.Callback() {
|
resource.setCallback(new Drawable.Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void invalidateDrawable(@NonNull Drawable drawable) {
|
public void invalidateDrawable(@NonNull Drawable drawable) {
|
||||||
if (callback != null) {
|
if (drawableCallBack != null) {
|
||||||
callback.invalidateDrawable(drawable);
|
drawableCallBack.invalidateDrawable(drawable);
|
||||||
}
|
}
|
||||||
view.invalidate();
|
view.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void scheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable, long l) {
|
public void scheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable, long l) {
|
||||||
if (callback != null) {
|
if (drawableCallBack != null) {
|
||||||
callback.scheduleDrawable(drawable, runnable, l);
|
drawableCallBack.scheduleDrawable(drawable, runnable, l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void unscheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable) {
|
public void unscheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable) {
|
||||||
if (callback != null) {
|
if (drawableCallBack != null) {
|
||||||
callback.unscheduleDrawable(drawable, runnable);
|
drawableCallBack.unscheduleDrawable(drawable, runnable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue