Comments (14)
是在什么设备上出现这种情况的?是最新的代码吗?我在模拟器和手机上试,都有过渡动画的。
from realstuff.
在moto x 2014 上,android 5.1版本。过渡动画确实是有的,就是那个放大图片的动画对吧。但是在放大前,小的图片会有短暂的闪烁,有些发白。
from realstuff.
最新的代码。
from realstuff.
很明显吗?我还真没有发现。
from realstuff.
在我这机器上确实挺明显的。话说前辈你有没有馒头先生的那个app啊,点击它的小图片,不会出现这种闪烁,过渡平滑。可能也是我的机型问题吧,我去找找其他手机测一下。
from realstuff.
刚刚用nexus 5 和 5x的avd都测试过了,点击图片确实会出现明显的闪烁(闪烁仅仅出现在被点击的小图区域)。(@_@;),但是从大图点击返回却顺滑无比,动画正常,没有任何闪烁。。
from realstuff.
你提到的一闪会不会是波纹点击效果?可以试着删除图片对应的布局文件的foreground属性试试
from realstuff.
究过了,并不是波纹效果,因为波纹效果是固定一个圆心并向四周扩散的嘛。我把foreground属性去掉了,并且尝试替换cardView的布局,直接改成FrameLayout,仍然会出现那种闪屏现象。我自己并没有解决问题的方法,只是work around了这个问题。我用右进左出的overridependingtransition的动画替换了前辈您的放大图片动画,于是没有出现这种闪屏现象,但是相对来说,我还是更喜欢您的这种放大动画,但是那个闪屏对我来说,强迫症有些受不了 233。可以对比馒头先生的动画,我觉得做到了极致啊,丝般顺滑,但是对比你们的代码,我没有发现啥区别 (笑哭)。所以我也不知道该咋办了。。真是一个奇葩的问题。
ps,话说,我不停地点击同一张图片,有少部分的几次,动画会顺畅一点不会出现闪屏现象(或许这个动画跟app的硬件加速机制有关?只是一个猜想)。
from realstuff.
这个我再查些资料,我发现网上确实有这方面的问题,但还没有找到明确的方法。
from realstuff.
问题解决了,是由于查看图片的Activity用了沉浸式模式,才导致了transition动画一闪。具体原因就不知道了。
from realstuff.
谢谢前辈,解决这个问题。
但是,我看馒头先生也是沉浸式的啊,具体代码没有对比。
不过,work around也是一种解决方案嘛,嘻嘻。
话说我改了动画之后一样很风*呢。
from realstuff.
@DomceyKoo 你确定馒头先生ViewerActivity用的是沉浸式模式?我运行了下,刷新出错了,刷不出图片,估计API改了。我看代码并没有看到设置沉浸式模式的标志位。
from realstuff.
@DomceyKoo 我说的沉浸式模式是指默认隐藏statusbar和navigationbar,只能通过特定的上滑或下滑短暂切换出statusbar和navigationbar的全屏模式。
from realstuff.
额是的,我没有看他关于设置哪种模式的代码,主要就对比了动画了。。
馒头先生确实没用沉浸式模式。
原来确实是沉浸式模式与动画产生冲突了,不容易啊,找到这个冲突所在。
佩服您。
from realstuff.
Related Issues (14)
- 关于图片的点击问题 HOT 2
- 请问有清除缓存的功能吗? HOT 3
- 关于LoadingMore HOT 2
- dev版本发现一个bug HOT 7
- Clear images cache
- 关于RecycleView+Glide实现瀑布流重新排列的问题 HOT 2
- IvoeHu,您好 HOT 2
- 请问在搜索结果中可以显示已收藏的图标效果吗? HOT 1
- 关于下拉刷新的bug反馈 HOT 1
- 关于APP板块以及扩展资源板块的问题 HOT 3
- java.lang.IllegalArgumentException: Problem decoding into existing bitmap
- 你好 HOT 4
- 你好 能否加下我的qq呢 HOT 1
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 realstuff.