android - '错误 : Ambient Vertex Buffer overflow!!使用 304,总共 260' Android ViewPropertyAnimator

标签 android viewpropertyanimator

我在 android 中使用如下所述的 View 属性动画器。它在大多数设备上运行良好,但在某些设备上会出现上述错误。它也总是在模拟器中失败。对象动画师也有同样的问题。请注意,如果应用在单个 View 上,动画会起作用,但不适用于具有多个 subview 的容器。请帮忙

    wordViewPropertyAnimator.rotationYBy(-90f).setDuration(resources.getInteger(R.integer.rotateAnimationHalf))
            .setListener(new AnimatorListener() {
                @Override
                public void onAnimationStart(Animator animation) {

                }

                @Override
                public void onAnimationEnd(Animator animation) {
                    wordViewPropertyAnimator.setListener(null);
                    wordViewPropertyAnimator.rotationYBy(-180f).setDuration(0).start();

                    wordViewPropertyAnimator.rotationYBy(-90f).
                            setDuration(resources.getInteger(R.integer.rotateAnimationHalf)).start();                       

                }

                @Override
                public void onAnimationCancel(Animator animation) {

                }

                @Override
                public void onAnimationRepeat(Animator animation) {

                }
            })
            .start();

ObjectAnimator objectAnimator=ObjectAnimator.ofFloat(wordView, 查看.ROTATION_Y, -90f); objectAnimator.setDuration(200); objectAnimator.start();

最佳答案

我知道你刚才被问过,问题不再需要这个答案,但我希望将来能帮助别人:

我遇到了同样的问题,尝试了 XML 上的 objectAnimator 并尝试了 ViewPropertyAnimator 来为我的 View 设置动画,两者都给出了相同的结果,所以我找到的解决方案是更改应用动画的布局,我正在应用它到 cardView,我只是用 FrameLayout 包围它,并将动画应用到组 View 中,它工作得很好。我希望它对将来的人有所帮助。

关于android - '错误 : Ambient Vertex Buffer overflow!!使用 304,总共 260' Android ViewPropertyAnimator,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37841916/

相关文章:

android animate() withEndAction() vs setListener() onAnimationEnd()

android - 在 Android 上读取 XML 数据时删除 HTML 标签

android - 尝试通过在 android 中使用 Google Maps Android API v2 来显示 StreetView 但无法使其正常工作

android - 在android中与httpclient的安全连接

android - 在 Gmail 应用程序中切换帐户动画

Java获取本地内部地址

android - 如何让设备进入休眠模式

android - 使用动画师对其某些属性进行动画处理后,如何将 View 重置为原始状态?

android - 获取父布局的宽度