[Android] Update deprecated call
Geoffrey Métais
git at videolan.org
Thu Jan 5 15:23:00 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 5 11:48:28 2017 +0100| [33f18bb4fd40ccfee6450bd04ab1524b31a89277] | committer: Geoffrey Métais
Update deprecated call
> https://code.videolan.org/videolan/vlc-android/commit/33f18bb4fd40ccfee6450bd04ab1524b31a89277
---
vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java b/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
index 9aa80be..6401645 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
@@ -32,6 +32,7 @@ import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
+import android.support.v4.view.ViewCompat;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
@@ -160,7 +161,7 @@ public class AsyncImageLoader {
iv.setScaleType(ImageView.ScaleType.FIT_CENTER);
iv.setImageBitmap(bitmap);
} else if (target instanceof TextView) {
- target.setBackgroundDrawable(new BitmapDrawable(VLCApplication.getAppResources(), bitmap));
+ ViewCompat.setBackground(target, new BitmapDrawable(VLCApplication.getAppResources(), bitmap));
((TextView) target).setText(null);
}
}
More information about the Android
mailing list