Android/Tip&Tech
[펌]Animation에 대한 이해(1) - animaiton( android.view.animation ) Api
행복한 수지아빠
2010. 12. 13. 13:11
Posted by 안드로이드노트 그린웹Animation : 2010/12/12 02:22
android.view.animation
public abstract class
Animation Class
예를 들어 아래와 같은 구현부가 있다면.
AnimationSet set = new AnimationSet(true);
2. Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(100);
set.addAnimation(animation);
animation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, -1.0f,Animation.RELATIVE_TO_SELF, 0.0f
);
animation.setDuration(100);
api를 보면
2번째 라인에서 Animation클래스와 AlphaAnimation 는 다른 클래스이고 Animation 에 당연히 AlphaAnimation(,) 생성자가 없다. 보다 보니 Animation는 추상클래스 이네여;;; 그래서 다른 클래스의 객체 생성이 가능한 것이죠..
또한 animation 패키지에 속한 에니메이션 관련 클래스들을 보면 단일 뷰(객체)에 대한 적용과 리스트뷰(listView)와 그리드뷰(GridView) 와 같이 Animaiton 객체 생성 후(다수 Animation 객체생성) AnimationSet 클래스로 인해 에니메이션 조합 후(멋진 에니이션 표현을 위함) 레이아웃 콘트롤러(GridLayoutAnimationController, LayoutAnimationController) 클래스들에게 다시 적용되어 각 리스트 뷰들이 적용이 가능하도록 되어있음..
이는 리스트들 하나하나에게 에니메이션을 적용하기 위한 방법임.. 흠.. 자세한 것은 API 를 좀더 자세히 본 후 설명하여야 겠음..
한 마디로 단일뷰와 리스트형식의 뷰에 에니메이션을 적용하기 위한 방법을 제공한다.
android.view.animation 구성