//등장 애니메이션
AnimationSet set = new AnimationSet(true);
set.setInterpolator(new DecelerateInterpolator()); //점점 느리게


Animation ani01 = new AlphaAnimation(0.0f,1.0f); //알파 애니메이션
ani01.setDuration(1000);


Animation ani02 = new TranslateAnimation(800, 0, 0, 0); // 이동 애니메이션
ani02.setDuration(1000);


set.addAnimation(ani01);
set.addAnimation(ani02);


customViewHolder.popup1.setAnimation(set); //customViewHolder.popup1은 view 이름



- 점점 빠르게 : accelerate_interpolator
- 점점 느리게 : decelerate_interpolator
- 위 둘을 동시에 : accelerate_decelerate_interpolator
- 시작위치에서 조금 뒤로 당겼다 이동 : anticipate_interpolator
- 도착위치를 조금 지나쳤다가 도착위치로 이동 : overshoot_interpolator
- 위 둘을 동시에 : anticipate_overshoot_interpolator
- 도착위치에서 튕김 : bounce_interpolator 

'android' 카테고리의 다른 글

함수 끝나고 다른 함수 실행  (0) 2017.06.01
안드로이드 화면 사이즈 구하기  (0) 2017.03.20
Custom SimpleAdapter  (0) 2017.02.22
인텐트 전환효과 없애기  (0) 2017.02.20
버튼 중복클릭 방지  (0) 2016.11.29

WRITTEN BY
carbo

,