简体   繁体   English

如何进行动画活动过渡

[英]How to make animation activity transition

I am newbie in Android and i just started to make animations over activities. 我是Android的新手,我刚刚开始制作活动动画。 I am testing out and also learning this part carefully. 我正在测试,也正在仔细学习这一部分。 I have created several animations over activities, ex Zoom_in effect: 我为活动创建了多个动画,例如Zoom_in效果:

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/decelerate_interpolator">
    <scale android:fromXScale="0.0" android:toXScale="1.0"
       android:fromYScale="0.0" android:toYScale="1.0"
       android:pivotX="50%p" android:pivotY="50%p"
       android:duration="@android:integer/config_mediumAnimTime" />
</set>

Zoom_out effect: 缩小效果:

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/decelerate_interpolator"
    android:zAdjustment="top">
    <scale android:fromXScale="1.0" android:toXScale=".5"
       android:fromYScale="1.0" android:toYScale=".5"
       android:pivotX="50%p" android:pivotY="50%p"
       android:duration="@android:integer/config_mediumAnimTime" />
    <alpha android:fromAlpha="1.0" android:toAlpha="0"
        android:duration="@android:integer/config_mediumAnimTime"/>
</set>

and so on... Then with overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit); 依此类推...然后使用overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);

i called them and everything is working. 我打电话给他们,一切正常。 Now i need help to make more advanced animation over activities, for example how can i make this animation that i saw in dribble, as I said i am newbie and if you help me making this i would be so happy :)) 现在我需要帮助来制作比活动更高级的动画,例如,如何制作运球中看到的动画,正如我所说的我是新手,如果您能帮助我制作动画,我会非常高兴:))

Link: https://dribbble.com/shots/1942943-Product-purchase-transition?list=following&offset=0 链接: https//dribbble.com/shots/1942943-Product-purchase-transition?list = following&offset = 0

IMO this is not an activity transition, but i think it is a custom view or fragment that is added dynamically at runtime. IMO这不是活动过渡,但我认为这是在运行时动态添加的自定义视图或片段。

If you are targeting to Lollipop(API >= 21) you can find something similar in the android sdk. 如果您定位到Lollipop(API> = 21),则可以在android sdk中找到类似的内容。 Please take a look at: http://android-developers.blogspot.it/2014/10/implementing-material-design-in-your.html in the section "authenthic motion" or https://developer.android.com/training/material/animations.html in the "reveal effect". 请在“真实动作”部分或https://developer.android.com中查看: http : //android-developers.blogspot.it/2014/10/implementing-material-design-in-your.html /training/material/animations.html中的“显示效果”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM