public void setAnimatedGif(int rawResourceId, TYPE streachType) {
setImageBitmap(null);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
mType = streachType;
animatedGifImage = true;
is = getContext().getResources().openRawResource(rawResourceId);
try {
mMovie = Movie.decodeStream(is);
} catch (Exception e) {
e.printStackTrace();
byte[] array = streamToBytes(is);
mMovie = Movie.decodeByteArray(array, 0, array.length);
}
p = new Paint();
}
AnimatedGifImageView.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:droidex
作者:
评论列表
文章目录