on working...
Animation 종류
Resource path
- View Animation
- res/anim/animation_deatil.xml : Tween animation
- res/drawable/animation_detail.xml : Frame animation
- Property Animation
- res/animatior/animation_detail.xml
class 종류
- View Animation
- Animation : Tween animation
- AnimationDrawable : Frame Animation
- Property Animation
- ValueAnimator
- ObjectAnimator
- AnimatorSet.
Visibility 와 animation
ref. 2 처럼 해결하는 것이 가장 편리해 보인다.원하는 View 를 extends 하고, show 와 hide 를 새롭게 정의해서 사용하면 편리하다. 그러면 Visibility 를 View.VISIBLE 로 하고나 View.INVISIBLE 로 설정할 때 animation 을 같이 넣어줄 수 있다.
Source examples
View Animation
ImageView image = (ImageView) findViewById(R.id.image); Animation hyperspaceJump = AnimationUtils.loadAnimation
(this, R.anim.hyperspace_jump); image.startAnimation
(hyperspaceJump);
AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(myContext, R.anim.property_animator); set.setTarget(myObject); set.start();
See Also
References
- Developer page : Android Animation : http://developer.android.com/guide/topics/resources/animation-resource.html
- Android: show/hide a view using an animation - Stack Overflow
댓글 없음:
댓글 쓰기