Skip to content

MaterialLoadingRenderer

dinus_developer edited this page Aug 1, 2016 · 19 revisions

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();    

setWidth

public Builder setWidth(int width)

Sets the width of the LoadingDrawable which applys the LoadingRenderer.

setHeight

public Builder setHeight(int height)

Sets the height of the LoadingDrawable which applys the LoadingRenderer.

setStrokeWidth

public Builder setStrokeWidth(int strokeWidth)

setCenterRadius

public Builder setCenterRadius(int centerRadius)

setColors

public Builder setColors(int[] colors)

Clone this wiki locally