|
|
@@ -58,6 +58,8 @@ import android.widget.VideoView;
|
|
|
import com.bumptech.glide.Glide;
|
|
|
import com.bumptech.glide.RequestBuilder;
|
|
|
import com.bumptech.glide.load.DataSource;
|
|
|
+import com.bumptech.glide.load.DecodeFormat;
|
|
|
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|
|
import com.bumptech.glide.load.engine.GlideException;
|
|
|
import com.bumptech.glide.request.RequestListener;
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
@@ -116,6 +118,7 @@ import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
+import com.sheep.jiuyan.samllsheep.utils.GlideApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
|
|
|
import com.umeng.socialize.ShareAction;
|
|
|
import com.umeng.socialize.UMShareListener;
|
|
|
@@ -2038,6 +2041,14 @@ public class ViewUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void setGif(ImageView imageView, int resId){
|
|
|
+ GlideApp.with(imageView)
|
|
|
+ .asGif()
|
|
|
+ .load(resId)
|
|
|
+ .format(DecodeFormat.PREFER_ARGB_8888)
|
|
|
+ .into(imageView);
|
|
|
+ }
|
|
|
+
|
|
|
public static void setImage(ImageView imageView, Object object) {
|
|
|
if (imageView != null) {
|
|
|
if (object instanceof String) {
|