final ImageView refresh = findViewById(R.id.activity_other_top_refresh);
final ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(refresh, "rotation", 1080f);
objectAnimator.setDuration(2000);
objectAnimator.setRepeatCount(2);
refresh.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
objectAnimator.start();
} catch (Exception e) {
LogUtils.d(e);
}
mWebView.reload();
}
});
android 旋转刷新动画
最新推荐文章于 2021-05-25 20:24:03 发布
本文介绍了一种使用ObjectAnimator实现的刷新按钮动画效果,动画完成旋转1080度,持续2秒,并重复2次。同时,点击刷新按钮会触发WebView页面的重载。

222

被折叠的 条评论
为什么被折叠?



