-1
我正在製作動畫從0,100到各自的位置創建TextView
,更詳細的圖片視圖。動畫從一個點到各自的位置android
從左上角到加載UI時創建的textview。
並且,法線指示從頂部移動到textview位置。
簡單的方式,左上角到任何位置的動畫。
在此先感謝。
我正在製作動畫從0,100到各自的位置創建TextView
,更詳細的圖片視圖。動畫從一個點到各自的位置android
從左上角到加載UI時創建的textview。
並且,法線指示從頂部移動到textview位置。
簡單的方式,左上角到任何位置的動畫。
在此先感謝。
您可以使用此方法:
private void translateTextView(TextView textView, int targetX, int targetY) {
AnimatorSet animSetXY = new AnimatorSet();
ObjectAnimator y = ObjectAnimator.ofFloat(v,
"translationY",textView.getY(), targetY);
ObjectAnimator x = ObjectAnimator.ofFloat(v,
"translationX", textView.getX(), targetX);
animSetXY.playTogether(x, y);
animSetXY.setInterpolator(new LinearInterpolator(1f));
animSetXY.setDuration(300);
animSetXY.start();
}
我已經張貼的答案,這將幫助你http://stackoverflow.com/questions/30170786/how-to-fill-a-view-with-another -with材料設計動畫/ 30318641#30318641 –