Comments (5)
返回动画的机制大致是这样的:通过postDelayed(runnable,1000)让动画1秒后执行,但实际上1秒后该activity已经stop了,所以动画被延迟到了其activity返回时的onStart()后执行,有时候动画的时长较短,会被FirstActivity中的overridePendingTransition()淹没。还有,结束FirstActivity不能用finish,应该使用onBackPressed(),这样才会有返回动画。
from circularanim.
ok 我明白了 谢谢你的解答。
来自阿里邮箱 iPhone版 ------------------原始邮件 ------------------发件人:XunMengWinter [email protected]日期:2016-08-01 10:15:07收件人:XunMengWinter/CircularAnim [email protected]抄送:ShineYang [email protected], Author [email protected]主题:Re: [XunMengWinter/CircularAnim] 在fragment中startActivity有一定几率不出现回退动画 (#18)返回动画的机制大致是这样的:通过postDelayed(runnable,1000)让动画1秒后执行,但实际上1秒后该activity已经stop了,所以动画被延迟到了其activity返回时的onStart()后执行,有时候动画的时长较短,会被FirstActivity中的overridePendingTransition()淹没。还有,结束FirstActivity不能用finish,应该使用onBackPressed(),这样才会有返回动画。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from circularanim.
返回动画的机制大致是这样的:通过postDelayed(runnable,1000)让动画1秒后执行,但实际上1秒后该activity已经stop了,所以动画被延迟到了其activity返回时的onStart()后执行,有时候动画的时长较短,会被FirstActivity中的overridePendingTransition()淹没。还有,结束FirstActivity不能用finish,应该使用onBackPressed(),这样才会有返回动画。
作者您好,被淹没的这种情况,有没有好的解决办法呢?我在Android10的手机上很容易出现这种问题
from circularanim.
返回动画的机制大致是这样的:通过postDelayed(runnable,1000)让动画1秒后执行,但实际上1秒后该activity已经stop了,所以动画被延迟到了其activity返回时的onStart()后执行,有时候动画的时长较短,会被FirstActivity中的overridePendingTransition()淹没。还有,结束FirstActivity不能用finish,应该使用onBackPressed(),这样才会有返回动画。
我在android10的手机上发现即使启动了第二个界面(非透明),延迟动画依然执行了。貌似不会像之前的系统那样,activity不可见之后,动画不执行。
from circularanim.
我这边修改了源码,把返回动画的那段代码提取成了一个方法,延迟改成了100ms(如果不设置延迟,有一定概率不显示动画,我估计是activity还没有显示好就执行了,导致动画没出来)。然后在onActivityResult中进行调用,这样保证了每次都能够显示返回动画,但是这样以来破坏了整体性,没有之前使用方便了。作者如果有好的方法可以告诉我。
from circularanim.
Related Issues (20)
- 发布到Jcenter,推荐一篇我写的博客。亲测可用 HOT 1
- 又是小米.. HOT 3
- 关于JCenter的上传方法 HOT 1
- 原作品那个怎么github下载的链接啊 HOT 1
- 在4.2.2上面没有动画效果,5.0上面有 HOT 3
- 源码中有个地方写错了吧 HOT 1
- 几率不出现返回动画 HOT 1
- Cannot start this animator on a detached view! HOT 7
- 华为手机上出现掉帧问题
- 启动Activity问题 HOT 1
- fullActivity 方法返回的animation能否设置呢? HOT 1
- 我使用CircularAnim.hide(view).go后使用CircularAnim.show(view).go无法显示出button
- 让按钮收缩不起作用 HOT 1
- Hi, Is there any way to set the color using just int color value, not a resource? HOT 1
- is there any way to close reveal animation with drag like snap chat and wats app status
- 铺满颜色启动Activity时显示延迟 HOT 2
- Reveal Animation for full Activity
- 在android7.0上 startActivity()动画会有卡顿动画不平滑 HOT 1
- 关于fullactivity()的时间疑问 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circularanim.