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