AnimationSet scaleanimationSet = new AnimationSet(true); ScaleAnimation scaleAnimation = new ScaleAnimation(1f,2f,1f,2f,Animation.RELATIVE_TO_SELF,0.5f, Animation.RELATIVE_TO_SELF,0.5f); scaleAnimation.setRepeatCount(3); scaleanimationSet.addAnimation(scaleAnimation); scaleanimationSet.setStartOffset(2000); scaleanimationSet.setDuration(2000); scaleanimationSet.setFillAfter(true);imageView.startAnimation(scaleanimationSet);
如代码所示,必须设置ScaleAnimation的 RepeatCount才有效,而AnimationSet.setRepeatCount无效!
AnimationSet.setRepeatCount无效问题
最新推荐文章于 2020-10-02 13:04:34 发布