Here I am sharing a custom progress bar to show loading.
First of all, we need to define it in gradle file
compile 'com.victor:lib:1.0.2'
Then in xml file:
<com.victor.loading.rotate.RotateLoading
android:id="@+id/loading"
android:layout_width="100dp"
android:layout_height="100dp"
app:loading_width="5dp"
app:loading_color="#ffffff"
android:layout_centerInParent="true"/>
</FrameLayout>
In java code:
RotateLoading mRotateLoading;
mRotateLoading = (RotateLoading)findViewById(R.id.loading);
When we want to start loading
mRotateLoading.start();
When we want to stop loading
mRotateLoading.stop();
Just try it.
0 Comment(s)