Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

energy consumption #6

Closed
daydayup999 opened this issue Apr 7, 2016 · 2 comments
Closed

energy consumption #6

daydayup999 opened this issue Apr 7, 2016 · 2 comments

Comments

@daydayup999
Copy link

CPU occupancy will be high

private void animateTextView() {
final Runnable runnable = new VerticalMarqueeTextView.MarqueeRunnable(this.textView);

    long previousMillis = 0;

    while (VerticalMarqueeTextView.this.marqueeStarted && !VerticalMarqueeTextView.this.marqueePaused) {
        final long currentMillis = System.currentTimeMillis();

        if (currentMillis >= previousMillis) {
            VerticalMarqueeTextView.this.handler.post(runnable);

            previousMillis = currentMillis + (long)(1000d / VerticalMarqueeTextView.this.marqueeSpeed);
        }
    }

    this.isAnimating = false;
}
@ayltai
Copy link
Owner

ayltai commented Apr 7, 2016

Right. A better approach should be used.

ayltai added a commit that referenced this issue May 28, 2016
TravisCI, CircleCI, CodeShip, Bitrise, BuddyBuild
@ayltai
Copy link
Owner

ayltai commented May 28, 2016

This issue is fixed in version 1.0.2

@ayltai ayltai closed this as completed May 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants