CircleControlDrawer

A ControlDrawer that draws the given circle.

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
private final ColorsScheme colors

The drawer colors.

Link copied to clipboard
private final IntArray colorsArray

An IntArray of the current colors properties.

Link copied to clipboard
public final static Float MAX_RADIUS_RATIO

The maximum valid radius ratio value.

Link copied to clipboard
public final static Float MIN_RADIUS_RATIO

The minimum valid radius ratio value.

Link copied to clipboard
private final Paint paint

The drawer paint.

Link copied to clipboard
Link copied to clipboard
private Float ratio

Functions

Link copied to clipboard
public Unit draw(Canvas canvas, Control control)

Draw the control representation.

Link copied to clipboard

Gets the accent color of colors.

Link copied to clipboard
protected Double getCircleRadius(Control control)

Gets the circle radius.

Link copied to clipboard
protected final ColorsScheme getColors()
Link copied to clipboard
protected final IntArray getColorsArray()
Link copied to clipboard
protected Double getMaxDistance(Control control)

Gets the maximum distance to where the center position of the circle can be.

Link copied to clipboard
protected final Paint getPaint()
Link copied to clipboard
protected Shader getPaintShader(Control control, ImmutablePosition position)

The Shader for the drawer paint.

Link copied to clipboard

Gets the current position where the control is located and that the drawer will take as center to draw the circle.

Link copied to clipboard

Gets the primary color of colors.

Link copied to clipboard
@FloatRange(from = 0.10000000149011612, to = 0.800000011920929)
public final static Float getRadiusRatio(Float ratio)

Checks if the ratio value meets the valid range.

Link copied to clipboard
public final Float getRatio()

Gets the circle radius ratio.

Link copied to clipboard
public Unit setAccentColor(Integer accentColor)

Sets the accent color of colors.

Link copied to clipboard
public Unit setColors(ColorsScheme colors)

Sets the primary and accent colors of drawer based on a schema.

public Unit setColors(@ColorInt() Integer primary, @ColorInt() Integer accent)

Sets the primary and accent colors of drawer.

Link copied to clipboard
public Unit setPrimaryColor(Integer primaryColor)

Sets the primary color of colors and paint.

Link copied to clipboard
public final Unit setRatio(Float ratio)

Sets the circle radius ratio.