LoadingButtonAndroid
LoadingButtonAndroid copied to clipboard
startAnimation() with no parameters not working
After calling startAnimation() with no parameters the animation doesn't start. The version I am using is 2.2.0
This is my code
<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
android:id="@+id/login_button"
style="@style/RoundedGreenSubmitButton"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/login_text"
app:spinning_bar_color="@color/greenSubmitButtonBPay"
app:spinning_bar_padding="8dp"
app:spinning_bar_width="4dp"
android:background="@drawable/button_shape_no_fill"
app:initialCornerAngle="0dp"
app:layout_constraintBottom_toTopOf="@+id/register_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" />
This is how I am testing it with DataBinding.
ui.loginButton.setOnClickListener {
//login()
ui.loginButton.startAnimation()
}
🤔 Did you try to use this inside a linear layout instead of the constraint layout? This button doesn't work very well with constraints
If you use v2.1.5, you can call someFragmentBinding.someCircularProgressButton..startMorphAnimation() instead.