progress indicator chip code example

Example: progress indicator chip

//use androidx.swiperefreshlayout.widget.CircularProgressDrawable

CircularProgressDrawable progressDrawable = new CircularProgressDrawable(context);
progressDrawable.setStyle(CircularProgressDrawable.DEFAULT); //DEFAULT or LARGE
progressDrawable.setColorFilter(BlendModeColorFilterCompat.createBlendModeColorFilterCompat(indicatorColor, BlendModeCompat.SCR_IN)); //set indicator color

chip.setChipIcon(progressDrawable); //set progress drawable on chip
progressDrawable.start(); //start animation

Tags:

Misc Example