public AnimatedImageButton(Context context, AttributeSet attrs) {
super(context, attrs);
//get attributes from xml
TypedArray a = context.getTheme().obtainStyledAttributes(
attrs,
R.styleable.AnimatedImageButton,
0, 0);
try {
if(!a.hasValue(R.styleable.AnimatedImageButton_animation))
throw new RuntimeException("animation attribute missing from " + getClass().getSimpleName()
+ ". This attribute is mandatory.");
animation = AnimationUtils.loadAnimation(context, a.
getResourceId(R.styleable.AnimatedImageButton_animation, 0));
defaultRepeatCount = animation.getRepeatCount();
} finally {
a.recycle();
}
defaultRepeatCount = animation.getRepeatCount();
}
AnimatedImageButton.java 文件源码
java
阅读 49
收藏 0
点赞 0
评论 0
项目:chromium-swe-updater
作者:
评论列表
文章目录