Material Design에서 궁금한 점이 있습니다.
조회수 1790회
안녕하세요.
https://material.google.com/motion/transforming-material.html#
제가 구현하고 싶은게 이 부분에서 rectangle transforming입니다.
Symmetric transformation부분인데
어떤 위젯을 클릭하면 자연스럽게 확장되는걸 구현하고 싶습니다.
혹시 디자인 서포트 라이브러리에서 기본 지원이 가능한지 아니면 구현이 필요한 부분인지 궁금합니다.
- 감사합니다.
-
(•́ ✖ •̀)
알 수 없는 사용자
1 답변
-
너비와 높이를 동시에 확장하는 것은 ScaleAnimation 클래스를 사용해서 간단하게 구현할 수 있습니다. 특정 뷰의 클릭 리스너에 아래 코드를 넣어서 테스트 해보세요.
ScaleAnimation scaleAnimation = new ScaleAnimation(1f, 2f, 1f, 2f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); scaleAnimation.setDuration(300); scaleAnimation.setFillAfter(true); view.startAnimation(scaleAnimation);
ScaleAnimation
-
(•́ ✖ •̀)
알 수 없는 사용자
-
댓글 입력