我想要将imageView设置为微粒大小(另一个imageView的高度和宽度)。我认为这很容易,但我找不到任何合适的解决方案。如何在Android中将图像缩放到包含动画的高度和宽度
我曾尝试 -
ObjectAnimator scaleX = ObjectAnimator.ofFloat(img1, "scaleX", (float) img2.getWidth());
ObjectAnimator scaleY = ObjectAnimator.ofFloat(img1, "scaleY", (float) img2.getHeight());
scaleX.setDuration(2000);
scaleY.setDuration(2000);
AnimatorSet scale = new AnimatorSet();
scale.play(scaleX).with(scaleY);
scale.start();