下から250dpのImageViewがあり、翻訳アニメーションを使用して下から50dpに移動したいと考えています。
翻訳アニメーションの使い方は知っていますが、ToYValue フィールドがどうなるかわかりません。
コードは次のようになります。
TranslateAnimation translate = new TranslateAnimation(Animation.RELATIVE_TO_PARENT,0,Animation.RELATIVE_TO_PARENT,0,Animation.ABSOLUTE,250,Animation.ABSOLUTE,50);
translate.setDuration(1000);
translate.reset();
translate.setFillAfter(true);
iv.clearAnimation();
iv.startAnimation(translate);