GithubHelp home page GithubHelp logo

Comments (6)

rahatarmanahmed avatar rahatarmanahmed commented on May 21, 2024

Seems like all application animations are disabled in battery saver mode, causing all ValueAnimators to end instantly. However, CPV just resets the animation at the end of the indeterminate animation, so it just sorta flickers and crashes my emulator. @fredericojssilva: Was flickering the only issue or did it cause other problems like crashing or battery drainage?

from circularprogressview.

rahatarmanahmed avatar rahatarmanahmed commented on May 21, 2024

I don't know if there is a good solution to this. However, since battery saver mode was introduced in API 21, I would suggest using the native progress bar when running API >=21. I believe this should be possible with the <include> tag to include a layout/progress_bar.xml using a CPV, and then making a layout-v21/progress_bar.xml that uses the native ProgressBar.

from circularprogressview.

rongi avatar rongi commented on May 21, 2024

@rahatarmanahmed What do you think about not running animation in battery saver mode? This flickering looks really bad.

from circularprogressview.

rahatarmanahmed avatar rahatarmanahmed commented on May 21, 2024

@rongi As I said before, I still think this should be solved by not using CPV on API >= 21. Much easier to just swap in the native view than to deal with handling battery saver mode logic.

(That being said, if you can figure out how to do that automatically in CPV itself without breaking it for older versions, I would definitely accept a PR for that.)

from circularprogressview.

rongi avatar rongi commented on May 21, 2024

@rahatarmanahmed Is it possible to have native view that looks the same as CPV on Android API >= 21? Is it possible to change color of that view? Will this native view look the same across different android devices? I'm using CPV mainly for consistency of how progress view looks across devices.

from circularprogressview.

rongi avatar rongi commented on May 21, 2024

I've just looked at behaviour of standard ProgressView and it looks like they just don't show their progress if device is in a battery saving mode. It feels like even this is a better behaviour than non stopping flickering.

from circularprogressview.

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.