http://developer.android.com/training/animation/zoom.htmlを API < 11に移植しようとしています。
そのために、nineoldandroid ライブラリを使用しています。ただし、nineoldandroid が理解できない部分があります。
AnimatorSet set = new AnimatorSet();
set.play(ObjectAnimator
.ofFloat(expandedImageView, View.X, startBounds.left))
.with(ObjectAnimator
.ofFloat(expandedImageView,
View.Y, startBounds.top))
.with(ObjectAnimator
.ofFloat(expandedImageView,
View.SCALE_X, startScaleFinal))
.with(ObjectAnimator
.ofFloat(expandedImageView,
View.SCALE_Y, startScaleFinal));
私はこれを次のようにしました:
AnimatorSet set = new AnimatorSet();
set.playTogether(
ObjectAnimator.ofFloat(expandedImageView, View.X, startBounds.left, finalBounds.left),
ObjectAnimator.ofFloat(expandedImageView, View.Y, startBounds.top, finalBounds.top),
ObjectAnimator.ofFloat(expandedImageView, View.SCALE_X, startScale, 1f),
ObjectAnimator.ofFloat(expandedImageView, View.SCALE_Y, startScale, 1f)
);
ただし、View.X、View.Y、View.SCALE_X、View.SCALE_Y は受け付けません。
これらを文字列 "translationX", translationY" および "scaleX", "scaleY" に置き換える必要がありますか?