android 旋轉刷新動畫

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();
    }
});
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章