Coder Social home page Coder Social logo

Comments (22)

zhangliangming avatar zhangliangming commented on September 27, 2024

@DyncKathline 可能是动画问题,你试一下修改动画
mAnimator.setInterpolator(new LinearInterpolator());
你也可以尝试其它的动画试试。

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

mAnimator.setInterpolator(new LinearInterpolator());注释掉这句也没用,我现在做法是在更新动画的时候判断它的旋转角度小于0.2就直接设置成0这样就不会闪烁了,可这样做没找到根本原因。

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

之前一直都是用手机做的测试,在我测试机上没发现这个问题,在模拟器上面运行,确实有这个问题。感觉你这样子,那动画会不会不流畅? @DyncKathline

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

不会的,昨天电脑不在
image

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

@DyncKathline 我网上查了一下,好像有些人也有这种情况,不过未解决。对了,你是用真机测试的,还是用模拟器?

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

真机

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

@DyncKathline 方便说一下机型和系统版本吗?

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

vivox7 Android7.1

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

@DyncKathline 好的同,非常感谢。

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

@DyncKathline 你尝试一下把ValueAnimator.ofFloat修改为ValueAnimator.ofInt。这样子看一下闪烁是否还在,我把它修改之后,在模拟器上面运行,已经没有闪烁的问题了。你可以修改后,在真机上面试一下。

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

好的明天试试,谢谢

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

好了,但是还有一个小缺点,就是左右划来划去,在MotionEvent.ACTION_MOVE:这里设置setRotation(degree);还是会有小数值,会有闪烁

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

之前左右操作时,一直都存在闪烁的问题?

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

是的,感觉是不能小数吧,更新了你那个关闭动画的,因为在MotionEvent.ACTION_MOVE:那里没有

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

感觉是整数的话,旋转不流畅。这样吧,你到我github上面更新一下RotateLinearLayout这个类的代码(把你之前的这个类文件保存好),更新之后,看看还有没这个问题。

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

image
是的,我刚试了下,换成整数的话,左右滑动会不流畅

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

RotateLinearLayout这个类,你更新一下我最新代码。没理由的,想不通…😣

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

我另外再clone了你的代码运行,左右移动,在角度0.x几的时候会闪烁,松开reset动画没问题了

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

🙀😿,容我想想先。非常感谢你😁

from happyplayer5.

DyncKathline avatar DyncKathline commented on September 27, 2024

可以加个QQ吗,方便联系问题?

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

@DyncKathline 316257874。

from happyplayer5.

zhangliangming avatar zhangliangming commented on September 27, 2024

@DyncKathline 关闭硬件加速。

from happyplayer5.

Related Issues (20)

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.