Coder Social home page Coder Social logo

Comments (13)

liuxiong1992 avatar liuxiong1992 commented on September 24, 2024

或者其他可以控制动画播放时长的方法也行啊

from svgaplayer-android.

PonyCui avatar PonyCui commented on September 24, 2024

动画播放时调用 stepToFrame 是正确的方法,如果出现 crash,你可以把可以重现的 demo 发送至 [email protected]

from svgaplayer-android.

liuxiong1992 avatar liuxiong1992 commented on September 24, 2024

邮件发送好了,您有时间帮我看一下,谢谢

from svgaplayer-android.

PonyCui avatar PonyCui commented on September 24, 2024
            @Override
            public void onStep(int i, double v) {
                Log.d("---","---onStep--i="+i+"--v="+i);
                imageView.stepToFrame(i+1,true); //这里不知道怎么写,现在这样是会java.lang.StackOverflowError:stack size 8MB
            }

在 onStep 中调用 stepToFrame 会同时触发 onStep 回调,导致死循环。
你为何要做这样的操作?

from svgaplayer-android.

liuxiong1992 avatar liuxiong1992 commented on September 24, 2024

我想缩短动画的播放时间,stepToFrame()不知道应该在哪里调用

from svgaplayer-android.

PonyCui avatar PonyCui commented on September 24, 2024

缩短动画播放时间应该找设计师导出新的动画文件给你

from svgaplayer-android.

liuxiong1992 avatar liuxiong1992 commented on September 24, 2024

我看ios是可以跳帧播放的啊

from svgaplayer-android.

PonyCui avatar PonyCui commented on September 24, 2024

你应该找设计师解决这个问题

from svgaplayer-android.

liuxiong1992 avatar liuxiong1992 commented on September 24, 2024

可以设置每一帧的播放时间吗

from svgaplayer-android.

liuxiong1992 avatar liuxiong1992 commented on September 24, 2024

ios 好像可以在svgaPlayerDidAnimatedToFrame 这个方法里面跳帧

from svgaplayer-android.

PonyCui avatar PonyCui commented on September 24, 2024

只需要让设计把动画缩短即可

from svgaplayer-android.

liuxiong1992 avatar liuxiong1992 commented on September 24, 2024

好吧,不过那样同一个礼物效果要做至少两个动画文件----谢谢解答

from svgaplayer-android.

PonyCui avatar PonyCui commented on September 24, 2024

这种事情本来就不应该由代码控制的,一旦你这样做,只会让你的代码混乱不堪。

from svgaplayer-android.

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.