0
有可能使不斷變化的圖像,直到它設置最終的形象。我想改變圖像時,它的翻轉動畫android
我想改變它的翻轉圖像。 因此而翻轉
private ImageView image;
private void images() {
int[] ps={R.drawable.img1,R.drawable.img2};
Random r = new Random();
int n=r.nextInt(2);
image.setImageResource(ps[n]);
ObjectAnimator animation = ObjectAnimator.ofFloat(coin, "rotationY", 0f, 360f);
animation.setDuration(500);
animation.setInterpolator(new AccelerateDecelerateInterpolator());
animation.start();
}