Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button disappears after animation when width is set to wrap_content #177

Open
makni-sahar opened this issue Apr 15, 2021 · 0 comments
Open

Comments

@makni-sahar
Copy link

Hello,

I have a problem after revert animation when width is wrap_content.

So, my code looks like this

<br.com.simplepass.loadingbutton.customViews.CircularProgressButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_marginTop="160dp" android:layout_marginEnd="20dp" android:minWidth="0dp" android:minHeight="0dp" android:padding="10dp" .... app:spinning_bar_color="#FFF" app:spinning_bar_padding="6dp" app:spinning_bar_width="4dp" />

I've added minWidth and minHeight to remove extra padding on button and then set my own padding.

after the animation end, I set a new text like this :

loadingButton?.revertAnimation { // set text here }

The problem is the width is not set to wrap_content after animation end. (I see only the padding, if i remove the padding, the button disappears after animation)

If I change the width to an exact value (100dp for exemple) everything works fine.

Any fix for this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant