Giter VIP home page Giter VIP logo

Comments (6)

leandroBorgesFerreira avatar leandroBorgesFerreira commented on August 15, 2024

Hey Gabriel,

I will take a look and fix the problem tonight.

For now, I can say that "followButton.stopAnimation();" is supposed to only freeze the animation. If you want to display a text in the button, you will have to call "followButton.revertAnimation();" so the button will go back to be a normal button (not a loading spinner)

from loadingbuttonandroid.

digabriel avatar digabriel commented on August 15, 2024

Hi Leandro, thanks for your quick reply.

I try to call revertAnimation() and then set a new text, but after the revert animations ends, the button text go back to the original text, not the new one that i set. Example

// Here the button original text is "Follow"
followButton.startAnimation();

final Handler handler = new Handler();
      handler.postDelayed(new Runnable() {
        @Override
         public void run() {
               followButton.revertAnimation();
               followButton.setText("\u2713");
               followButton.setTextSize(18);
               // After i set the new text the button still presenting "Follow" when revert animation ends
      }
}, 2000);

from loadingbuttonandroid.

leandroBorgesFerreira avatar leandroBorgesFerreira commented on August 15, 2024

I just ran your code. The animation didn't stopped, you are right. I will fix and then i will tell you when its ready.

You are trying to make a "Done" status, right? I will add a "removeAnimation" so it will work as you expect. Then will work on a more polished version of a 'Done' status, the button doesn't support that right now.

from loadingbuttonandroid.

leandroBorgesFerreira avatar leandroBorgesFerreira commented on August 15, 2024

@digabriel I fixed the problem, the lib will work as you expect now. Use the version compile 'br.com.simplepass:loading-button-android:1.3.0'.

I also added the method
doneLoagingAnimation(int fillColor, Bitmap doneImage);
I does a Done status in a polished way, you can choose the color and the image of the status.

from loadingbuttonandroid.

digabriel avatar digabriel commented on August 15, 2024

Thank you very much @leandroBorgesFerreira!!!

from loadingbuttonandroid.

leandroBorgesFerreira avatar leandroBorgesFerreira commented on August 15, 2024

You are welcome!

from loadingbuttonandroid.

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.