Android 12 Developer Preview is here! Try it out, and give us your feedback!

CircularRevealWidget.RevealInfo

public static class CircularRevealWidget.RevealInfo
extends Object

java.lang.Object
   ↳ com.google.android.material.circularreveal.CircularRevealWidget.RevealInfo


RevealInfo holds three values for a circular reveal. The circular reveal is represented by two float coordinates for the center, and one float value for the radius.

Summary

Constants

float INVALID_RADIUS

Radius value representing a lack of a circular reveal clip.

Fields

public float centerX

View-local float coordinate for the centerX of the reveal circular reveal.

public float centerY

View-local float coordinate for the centerY of the reveal circular reveal.

public float radius

Float value for the radius of the reveal circular reveal, or INVALID_RADIUS.

Public constructors

RevealInfo(float centerX, float centerY, float radius)
RevealInfo(CircularRevealWidget.RevealInfo other)

Public methods

boolean isInvalid()

Returns whether this RevealInfo has an invalid radius, representing a lack of a circular reveal clip.

void set(CircularRevealWidget.RevealInfo other)
void set(float centerX, float centerY, float radius)

Inherited methods

Constants

INVALID_RADIUS

public static final float INVALID_RADIUS

Radius value representing a lack of a circular reveal clip.

Constant Value: 3.4028235E38

Fields

centerX

public float centerX

View-local float coordinate for the centerX of the reveal circular reveal.

centerY

public float centerY

View-local float coordinate for the centerY of the reveal circular reveal.

radius

public float radius

Float value for the radius of the reveal circular reveal, or INVALID_RADIUS.

Public constructors

RevealInfo

public RevealInfo (float centerX, 
                float centerY, 
                float radius)

Parameters
centerX float

centerY float

radius float

RevealInfo

public RevealInfo (CircularRevealWidget.RevealInfo other)

Parameters
other CircularRevealWidget.RevealInfo

Public methods

isInvalid

public boolean isInvalid ()

Returns whether this RevealInfo has an invalid radius, representing a lack of a circular reveal clip.

Returns
boolean

set

public void set (CircularRevealWidget.RevealInfo other)

Parameters
other CircularRevealWidget.RevealInfo

set

public void set (float centerX, 
                float centerY, 
                float radius)

Parameters
centerX float

centerY float

radius float