Open
Description
I am using CircularProgressButton in XML like this
<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
android:id="@+id/btnSelfCheckInCheckOut"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:spinning_bar_color="@color/color_on_primary"
tools:text="Check In"
tools:visibility="visible" />`
and button setting the text on button inside my fragment and start the animation like this btnSelfCheckInCheckOut.startAnimation()
and when I revert the animation the dynamically applied text is lost. I found a workout for this by calling saveInitialState()
after changing text.