在 ImageView 上实用地设置缩放动画时,我遇到了一些问题。基本上我有并且图像视图设置中心 H/V,但是当我应用动画时它会关闭它:(...Iv 读到枢轴 x/y 设置为 50%,但它似乎不起作用,任何反馈都会很棒...下面的屏幕截图
AnimationSet set = new AnimationSet(true);
Animation animation = new ScaleAnimation(1, 1.2f, 1, 1.2f, Animation.ABSOLUTE, 50, Animation.ABSOLUTE, 50);
animation.setDuration(500);
animation.setRepeatCount(-1);
animation.setRepeatMode(Animation.RESTART);
set.addAnimation(animation);
animation = new ScaleAnimation(1.2f, 1.4f, 1.2f, 1.4f, Animation.ABSOLUTE, 50, Animation.ABSOLUTE, 50);
animation.setDuration(500);
animation.setRepeatCount(-1);
animation.setRepeatMode(Animation.RESTART);
set.addAnimation(animation);
animation = new ScaleAnimation(1.4f, 1.0f, 1.4f, 1.0f, Animation.ABSOLUTE, 50, Animation.ABSOLUTE, 50);
animation.setDuration(500);
animation.setRepeatCount(-1);
animation.setRepeatMode(Animation.RESTART);
set.addAnimation(animation);
image_view.startAnimation(set);