-
Notifications
You must be signed in to change notification settings - Fork 638
MaterialLoadingRenderer
Builder class for MaterialLoadingRenderer objects. Provides a convenient way to set the various fields of a MaterialLoadingRenderer.
Example:
LoadingRenderer loadingRenderer = new MaterialLoadingRenderer.Builder(this)
.setWidth((int) DensityUtil.dip2px(this, 50))
.setHeight((int) DensityUtil.dip2px(this, 50))
.setCenterRadius((int) DensityUtil.dip2px(this, 10))
.setStrokeWidth((int) DensityUtil.dip2px(this, 4))
.setColors(new int[]{Color.GRAY, Color.RED, Color.GREEN})
.build(); public Builder setWidth(int width)
Sets the width in px of the LoadingDrawable which apply this LoadingRenderer.
public Builder setHeight(int height)
Sets the height in px of the LoadingDrawable which apply this LoadingRenderer.
public Builder setStrokeWidth(int strokeWidth)
Sets the stroke width of the progress spinner in pixels.
public Builder setCenterRadius(int centerRadius)
Sets the inner radius in px of the circle the progress spinner arc traces.
public Builder setDuration(int duration)
The length of the animation, in milliseconds. If this value is negative or zero will be ignored.
public Builder setColors(int[] colors)
Sets the colors the progress spinner alternates between.