Android Button which show loading three dots with animation
implementation 'com.github.emmessess:DotLoaderButton:0.1.4'
<com.emmessess.loaderbutton.DotLoaderButton
android:id="@+id/buttonLogin"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@id/llAlreadyHaveAccount"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:alpha=".5"
android:clickable="true"
android:fontFamily="@font/nunito_semibold"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="15sp"
app:disabledBackground="@drawable/button_unselected_bg"
app:enabledBackground="@drawable/button_selected_bg"
app:title="Login" />
Declare Variabe
lateinit var buttonLogin: DotLoaderButton
Initialize
buttonLogin = view.findViewById(R.id.buttonLogin)
Show Loader
buttonLogin.showLoading()
Hide Loader
buttonLogin.hideLoading()