내 앱에서 안드로이드 번역 애니메이션으로 놀고 있습니다. 화면의 오른쪽 상단에서 화면의 왼쪽 하단으로보기를 번역하고 싶습니다. 나는 그 견해를 번역 할 수있다. 이제 중간에서 몇 초 동안 번역을 일시 중지하고 싶습니다. 그런 다음 다시 시작하겠습니다. 나는 서로 다른 보간기를 가지고 놀기에 지쳤다. 그것들은 필요한 결과를주지 못합니다. 누군가 내가 이런 종류의 번역을 어떻게 할 수 있는지 말해 줄 수 있습니까?중간에 안드로이드 번역을 일시 중지하는 방법
번역을 위해 사용하고있는 코드를 공유하고 있습니다.
AnimationSet animationSet = new AnimationSet(true);
ScaleAnimation scale = new ScaleAnimation(1f, 2f,
1f, 2f,
ScaleAnimation.RELATIVE_TO_PARENT, .5f,
ScaleAnimation.RELATIVE_TO_PARENT, .1f);
animationSet.addAnimation(scale);
int size[] = MainActivity.getDisplaySize(this);
TranslateAnimation animation = new TranslateAnimation(-1000, 1500, 300, 850);
animationSet.addAnimation(animation);
animationSet.setDuration(6000);
animationSet.setFillAfter(false);
animationSet.setInterpolator(new FastOutLinearInInterpolator());
animationSet.setAnimationListener(new MyAnimationListener());
imageView.startAnimation(animationSet);
고마워요!
위해 나는하지만 난''''''TranslationAnimation''을 AnimationSet''' 등을 사용하고 두 번째 솔루션을 좋아 '클래스. 당신이 지적한 방법은'''ValueAnimator'' 클래스를위한 것입니다. –
그래, 알아. 그러나 이것이 가능한지 나는 모른다. AnimationSet 대신 ViewPropertyAnimator를 사용할 수 있다고 생각 했습니까? 현재 애니메이션이 잘 작동해야합니까? – FlanschiFox
'''ViewPropertyAnimator'''로 뷰를 스케일하고 변환 할 수 있습니까? 미안 해요, 전에 안드로이드에서 애니메톤으로 일한 적 없어요. 나는'''애니메이션''을 시작으로했다. –