Closed shubham08gupta closed 6 years ago
So I've tried to solve it and found that the attribute android:gravity="center_horizontal"
solves it. This happens when the layout is LinearLayout. What if the layout is ConstraintLayout?
This is nothing more than a library that animated into a loading spinner. It will respect its parent gravity. Since it is not possible to set gravity to ConstraintLayout you can wrap the button inside a LinearLayout and use it in the Constraint Layout
@leandroBorgesFerreira @shubham171294 it works with ContraintLayout also (without LinearLayout). We have to just set
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"
constrain property in the button and it work good.
Hi, I tried to use this library. The button is on the left but not coming to center when the animation starts. I've used the Second Activity layout and copied a button from MainActivity.kt to SecondActivity.kt