@SuppressLint("NewApi")
private void setViewAttributes(Context context, AttributeSet attrs,
int defStyle) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
final TypedArray array = context.obtainStyledAttributes(attrs,
R.styleable.GifView);
mMovieResourceId = array.getResourceId(R.styleable.GifView_gif, -1);
mPaused = false;
array.recycle();
if (mMovieResourceId != -1) {
mMovie = Movie.decodeStream(getResources().openRawResource(
mMovieResourceId));
}
}
GifView.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:misound
作者:
评论列表
文章目录