leandroBorgesFerreira/LoadingButtonAndroid

The circle shape of button when loading is not maintained when the button background is managed dynamically

Opened this issue · 0 comments

Hello, thank you for the awesome library

Issue:
I have a feature in my app where a loading button can change its color to grey when some conditions are not matched but button can still act like it is enabled.
So i am setting the button background dynamically like this in xml.

but when the animation starts the button keeps the original corner radius and the button just goes into loading state and it does not show a fully circular button.

android:background="@{canAddToCart ? @drawable/bg_btn_cart : @drawable/bg_btn_cart_disabled, default=@drawable/bg_btn_cart}"

I have found one work around by downgrading the version to 2.0.7 . btw i was using 2.2.0