I'm trying to use ContentLoadingProgressBar to display 1 second before hiding itself. However I can't seem to find any examples of how to use it correctly with a recyclerview.
So I've tried using just testing it, but I can't get it to display for a minimum amount of time. How would I do so?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/main_progressbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
style="?android:attr/progressBarStyleLarge"
android:visibility="visible"/>
</RelativeLayout>
I've simply just tried doing it like this:
mProgressBar.show();
mProgressBar.hide();
However it's not displaying for 1 second before hiding. It just hides automatically.