Skip to content

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

Open
@makni-sahar

Description

@makni-sahar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions