Skip to content

UIbug #11

Description

@Nullifier1571

有几率UI线程卡顿时候就会出现如下情况
WX20200616-163943@2x

Activity

  1. Nullifier1571 commented on Jun 16, 2020

    @Nullifier1571
    Author

    private void startAnimatorLoop() {
    Looper.myQueue().addIdleHandler(new MessageQueue.IdleHandler() {
    @OverRide
    public boolean queueIdle() {
    //你要处理的事情
    valueAnimator.cancel();
    valueAnimator.setDuration(2000);
    valueAnimator.setRepeatCount(ValueAnimator.INFINITE);
    valueAnimator.addUpdateListener(animatorUpdateListener);
    valueAnimator.start();
    return false;
    }
    });
    }

    我自己的解决方案

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions