ScaleProgressBar a customer progressbar for loading effect.
You can use ScaleProgressBar(will not be stucked in ui thread) like this 1.in xml
<com.arjinmc.widgets.ScaleProgressBar
android:id="@+id/spb"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
2.in java
ScaleProgressBar spBar = (ScaleProgressBar) findViewById(R.id.spb);
spBar.setProgress(20);
Or you can use ScaleProgressDialog(will be stucked in ui thread) like this
ScaleProgressDialog spDialog = new ScaleProgressDialog(this); spDialog.show(); spDialog.setProgress(20); https://mp.weixin.qq.com/s/_cfX132m6-z07SbFVNt8QQ