Progress Bar inside Spinner Android

Layout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<Spinner
android:id="@+id/YOUR_ID"
android:layout_width="match_parent"
android:layout_height="wrap_content"></Spinner>

<ProgressBar
android:id="@+id/YOUR_ID"
style="@android:style/Widget.ProgressBar.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
</RelativeLayout>

and Done, just play with GONE and Visible

mProgressBar.setVisibility(View.GONE);

mProgressBar.setVisibility(View.Visible);

Like what you read? Give Mujtahidah a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.