본문 바로가기
프로그래밍/Android(Java)

[Android] ObjectAnimator를 이용한 애니메이션

by 쿼카퀀트 2019. 9. 29.
728x90
ObjectAnimator anim=ObjectAnimator.ofFloat(View,"~",0,180,~~);
//* View : 상태를 바꿀 View를 입력. "~" : 위 View의 메서드 중, View.set~ 가 있는것만 됨
anim.setDuration(1000);
anim.start();

//* ex) TextView.setRotationX 존재. 따라서, .ofFloat(textView,"rotationX",0,180); 이란 코드 작성 가능
728x90

댓글