GithubHelp home page GithubHelp logo

Comments (14)

IvorHu avatar IvorHu commented on May 25, 2024

是在什么设备上出现这种情况的?是最新的代码吗?我在模拟器和手机上试,都有过渡动画的。

from realstuff.

 avatar commented on May 25, 2024

在moto x 2014 上,android 5.1版本。过渡动画确实是有的,就是那个放大图片的动画对吧。但是在放大前,小的图片会有短暂的闪烁,有些发白。

from realstuff.

 avatar commented on May 25, 2024

最新的代码。

from realstuff.

IvorHu avatar IvorHu commented on May 25, 2024

很明显吗?我还真没有发现。

from realstuff.

 avatar commented on May 25, 2024

在我这机器上确实挺明显的。话说前辈你有没有馒头先生的那个app啊,点击它的小图片,不会出现这种闪烁,过渡平滑。可能也是我的机型问题吧,我去找找其他手机测一下。

from realstuff.

 avatar commented on May 25, 2024

刚刚用nexus 5 和 5x的avd都测试过了,点击图片确实会出现明显的闪烁(闪烁仅仅出现在被点击的小图区域)。(@_@;),但是从大图点击返回却顺滑无比,动画正常,没有任何闪烁。。

from realstuff.

IvorHu avatar IvorHu commented on May 25, 2024

你提到的一闪会不会是波纹点击效果?可以试着删除图片对应的布局文件的foreground属性试试

from realstuff.

 avatar commented on May 25, 2024

究过了,并不是波纹效果,因为波纹效果是固定一个圆心并向四周扩散的嘛。我把foreground属性去掉了,并且尝试替换cardView的布局,直接改成FrameLayout,仍然会出现那种闪屏现象。我自己并没有解决问题的方法,只是work around了这个问题。我用右进左出的overridependingtransition的动画替换了前辈您的放大图片动画,于是没有出现这种闪屏现象,但是相对来说,我还是更喜欢您的这种放大动画,但是那个闪屏对我来说,强迫症有些受不了 233。可以对比馒头先生的动画,我觉得做到了极致啊,丝般顺滑,但是对比你们的代码,我没有发现啥区别 (笑哭)。所以我也不知道该咋办了。。真是一个奇葩的问题。

ps,话说,我不停地点击同一张图片,有少部分的几次,动画会顺畅一点不会出现闪屏现象(或许这个动画跟app的硬件加速机制有关?只是一个猜想)。

from realstuff.

IvorHu avatar IvorHu commented on May 25, 2024

这个我再查些资料,我发现网上确实有这方面的问题,但还没有找到明确的方法。

from realstuff.

IvorHu avatar IvorHu commented on May 25, 2024

问题解决了,是由于查看图片的Activity用了沉浸式模式,才导致了transition动画一闪。具体原因就不知道了。

from realstuff.

 avatar commented on May 25, 2024

谢谢前辈,解决这个问题。
但是,我看馒头先生也是沉浸式的啊,具体代码没有对比。
不过,work around也是一种解决方案嘛,嘻嘻。
话说我改了动画之后一样很风*呢。

from realstuff.

IvorHu avatar IvorHu commented on May 25, 2024

@DomceyKoo 你确定馒头先生ViewerActivity用的是沉浸式模式?我运行了下,刷新出错了,刷不出图片,估计API改了。我看代码并没有看到设置沉浸式模式的标志位。

from realstuff.

IvorHu avatar IvorHu commented on May 25, 2024

@DomceyKoo 我说的沉浸式模式是指默认隐藏statusbar和navigationbar,只能通过特定的上滑或下滑短暂切换出statusbar和navigationbar的全屏模式。

from realstuff.

 avatar commented on May 25, 2024

额是的,我没有看他关于设置哪种模式的代码,主要就对比了动画了。。
馒头先生确实没用沉浸式模式。
原来确实是沉浸式模式与动画产生冲突了,不容易啊,找到这个冲突所在。
佩服您。

from realstuff.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.