Android過渡動畫解釋結合的例子:Material-Animations
Android Transition Framework can be used for three main things:
- Animate activity layout content when transitioning from one activity to another.
- Animate shared elements (Hero views) in transitions between activities.
- Animate view changes within same activity.
1. Transitions between Activities
Animate existing activity layout content
When transitioning fromActivity AtoActivity Bcontent layout is animated according to defined transition. There are three predefined transitions available onandroid.transition.Transitionyou can use: Explode, Slide and Fade. All these transitions track changes to the visibility of target views in activity layout and animate those views to follow transition rules.
Explode | Slide | Fade |
---|---|---|
![]() |
![]() |
![]() |
You can define these transitions declarative using XML or programmatically. For the Fade Transition sample, it would look like this:
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!