HighlightControlDrawer

A ControlDrawer that draws a highlighted circular trapezoid.

Constructors

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
private Float innerRatio
Link copied to clipboard
Link copied to clipboard
private final Integer lastQuadrant

The last current quadrant where the control was.

Link copied to clipboard
public final static Integer MAX_ALPHA

The maximum valid value of the alpha channel.

Link copied to clipboard
public final static Float MAX_INNER_RADIUS_RATIO

The maximum ratio value to calculating the inner distance from the center.

Link copied to clipboard
public final static Integer MIN_ALPHA

The minimum valid value of the alpha channel.

Link copied to clipboard
public final static Float MIN_INNER_RADIUS_RATIO

The minimum ratio value to calculating the inner distance from the center.

Link copied to clipboard
private final Paint paint

The drawer paint.

Link copied to clipboard
Link copied to clipboard
private final Path trapezoidPath

The Path to draw the filled shape of the circular trapezoid.

Functions

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

Draw the control representation.

Link copied to clipboard
protected Unit drawTrapezoid(Canvas canvas, Control control)

Draws the current trapezoidPath.

Link copied to clipboard
protected Unit fillTrapezoid(Control control, Integer quadrant, Float sweepAngle)

Resets and fills the path of the circular trapezoid.

Link copied to clipboard

Gets the accent color of colors.

Link copied to clipboard
@IntRange(from = 50, to = 102)
public final static Integer getAlphaRanged(Integer alpha)

Checks if the alpha value meets the valid range.

Link copied to clipboard
public final static Integer getAlphaRangedColor(@ColorInt() Integer color)

Changes the alpha channel value of the given color to the one returned by getAlphaRanged.

Link copied to clipboard
protected final ColorsScheme getColors()
Link copied to clipboard
protected final IntArray getColorsArray()
Link copied to clipboard
protected Integer getCurrentQuadrant(Control control)

Gets the current quadrant of the control position.

Link copied to clipboard
protected Double getInnerDistance(Control control)

Gets the distance value between the inner arc of the trapezoid and the control center.

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

Checks if the ratio value meets the valid range.

Link copied to clipboard
public final Float getInnerRatio()

Gets the inner ratio value to calculate the inner distance from the control center to the inner arc of the trapezoid.

Link copied to clipboard
protected final Integer getLastQuadrant()

The last current quadrant where the control was.

Link copied to clipboard
protected Double getOuterDistance(Control control)

Gets the distance value between the outer arc of the trapezoid and the control center.

Link copied to clipboard
protected final Paint getPaint()
Link copied to clipboard
Link copied to clipboard

Gets the sweep angle for give direction type.

Link copied to clipboard
protected final Path getTrapezoidPath()

The Path to draw the filled shape of the circular trapezoid.

Link copied to clipboard
public final Boolean isStrictColor()

Gets the value that determines that the primary color should be taken as set or not.

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 final Unit setInnerRatio(Float innerRatio)

Sets the inner ratio value.

Link copied to clipboard
public Unit setPrimaryColor(Integer primaryColor)

Sets the primary color of colors and paint.

Link copied to clipboard
public final Unit setStrictColor(Boolean isStrictColor)

Sets the value that determines that the (new) primary color should be taken as set or not.