CircularRevealHelper
public
class
CircularRevealHelper
extends Object
| java.lang.Object | |
| ↳ | com.google.android.material.circularreveal.CircularRevealHelper |
Helper class to implement circular reveal functionality.
A CircularRevealWidget subclass will call the corresponding method in this helper,
which contains the actual implementations for circular reveal. This helper communicates back to
the widget via the ERROR(/#delegate).
Summary
Nested classes | |
|---|---|
@interface |
CircularRevealHelper.Strategy
Which strategy this view should use to create the circular reveal effect. |
Constants | |
|---|---|
int |
BITMAP_SHADER
Specify that this view should use a |
int |
CLIP_PATH
Specify that this view should use |
int |
REVEAL_ANIMATOR
Specify that this view should use |
Fields | |
|---|---|
public
static
final
int |
STRATEGY
|
Public constructors | |
|---|---|
CircularRevealHelper(CircularRevealHelper.Delegate delegate)
|
|
Public methods | |
|---|---|
void
|
buildCircularRevealCache()
|
void
|
destroyCircularRevealCache()
|
void
|
draw(Canvas canvas)
|
Drawable
|
getCircularRevealOverlayDrawable()
|
int
|
getCircularRevealScrimColor()
|
CircularRevealWidget.RevealInfo
|
getRevealInfo()
|
boolean
|
isOpaque()
|
void
|
setCircularRevealOverlayDrawable(Drawable drawable)
|
void
|
setCircularRevealScrimColor(int color)
|
void
|
setRevealInfo(CircularRevealWidget.RevealInfo revealInfo)
Sets the reveal info, ensuring that a reveal circle with a large enough radius that covers the
entire View has its |
Inherited methods | |
|---|---|
java.lang.Object
| |
Constants
BITMAP_SHADER
int BITMAP_SHADER
Specify that this view should use a BitmapShader to create the circular reveal effect.
BitmapShader is supported in all APIs, but has the downside that it can only animate a static
Bitmap.
Constant Value: 0 (0x00000000)
CLIP_PATH
int CLIP_PATH
Specify that this view should use clipPath(Path) to create the circular reveal
effect. clipPath() is only hardware accelerated on JELLY_BEAN_MR2 and
above.
Constant Value: 1 (0x00000001)
REVEAL_ANIMATOR
int REVEAL_ANIMATOR
Specify that this view should use createCircularReveal(View, int, int, float, float) to create
the circular reveal effect. This is only supported on LOLLIPOP and above.
Constant Value: 2 (0x00000002)
Fields
STRATEGY
int STRATEGY
Public constructors
CircularRevealHelper
CircularRevealHelper (CircularRevealHelper.Delegate delegate)
| Parameters | |
|---|---|
delegate |
CircularRevealHelper.Delegate |
Public methods
buildCircularRevealCache
void buildCircularRevealCache ()
destroyCircularRevealCache
void destroyCircularRevealCache ()
draw
void draw (Canvas canvas)
| Parameters | |
|---|---|
canvas |
Canvas |
getCircularRevealOverlayDrawable
Drawable getCircularRevealOverlayDrawable ()
| Returns | |
|---|---|
Drawable |
|
getCircularRevealScrimColor
int getCircularRevealScrimColor ()
| Returns | |
|---|---|
int |
|
getRevealInfo
CircularRevealWidget.RevealInfo getRevealInfo ()
| Returns | |
|---|---|
CircularRevealWidget.RevealInfo |
|
isOpaque
boolean isOpaque ()
| Returns | |
|---|---|
boolean |
|
setCircularRevealOverlayDrawable
void setCircularRevealOverlayDrawable (Drawable drawable)
| Parameters | |
|---|---|
drawable |
Drawable |
setCircularRevealScrimColor
void setCircularRevealScrimColor (int color)
| Parameters | |
|---|---|
color |
int |
setRevealInfo
void setRevealInfo (CircularRevealWidget.RevealInfo revealInfo)
Sets the reveal info, ensuring that a reveal circle with a large enough radius that covers the
entire View has its radius set to INVALID_RADIUS.
| Parameters | |
|---|---|
revealInfo |
CircularRevealWidget.RevealInfo |
Annotations
Interfaces
Classes
- CircularRevealCompat
- CircularRevealFrameLayout
- CircularRevealGridLayout
- CircularRevealHelper
- CircularRevealLinearLayout
- CircularRevealRelativeLayout
- CircularRevealWidget.CircularRevealEvaluator
- CircularRevealWidget.CircularRevealProperty
- CircularRevealWidget.CircularRevealScrimColorProperty
- CircularRevealWidget.RevealInfo
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.

