Closed AlexGZC closed 5 years ago
1 - The button respects the gravity of the parent view. Use it inside a LinearLayout with center gravity.
2 - If you just want to revert to the initial state, just call revertAnimation
without calling stop
. If it does't work, provide the code that you're using.
Hi @leandroBorgesFerreira , I am having trouble calling revertAnimation
in java.
Is this possible to use it in java or is there any other method to return the original button state.
Uhm, did you try to use null
? If you don't need any behaviour of the animation complete, null
should be fine
Actually, don't use null
. You can just use a simple lambda. Like this:
new CircularProgressButton(Mockito.mock(Context.class)).revertAnimation(() -> null)
Hi @leandroBorgesFerreira , thanks for the help. Now i could keep circle non the center, however, I have not been able to call revertAnimation because says that you have to set some params onto function. Is this the same thing as above?
Yes. It is the same as the dineshmm23, if you're using Java. I should add some documentation for Java usage
Just add a lambda in the callback and you'll be fine
Wrong reference
Yes. It is the same as the dineshmm23, if you're using Java. I should add some documentation for Java usage
I tried with this, it works
btnProceedToPay.revertAnimation(new Function0<Unit>() {
@Override
public Unit invoke() {
return null;
}
});
btnProceedToPay.revertAnimation(new Function0
() { @Override public Unit invoke() { return null; } });
I tried this and it didn't work for me. Please add some documentation for Java
Hi, i am trying to set the library. There are two things that i would like to do properly:
how to keep circle in the middle of screen, because it moves to the left when is started?
How to return the original button state, I have been trying to set what you have told onto readme, however Stops and reverse are not working, can you help me?