CircularRevealRelativeLayout

public class CircularRevealRelativeLayout
extends RelativeLayout implements CircularRevealWidget

java.lang.Object
   ↳ RelativeLayout
     ↳ com.google.android.material.circularreveal.CircularRevealRelativeLayout


A CircularRevealWidget wrapper for ERROR(/RelativeLayout).

Summary

Public constructors

CircularRevealRelativeLayout(Context context)
CircularRevealRelativeLayout(Context context, AttributeSet attrs)

Public methods

void actualDraw(Canvas canvas)
boolean actualIsOpaque()
void buildCircularRevealCache()

Prepares the reveal info property to be modified.

void destroyCircularRevealCache()

Cleans up after the reveal info property is reset.

void draw(Canvas canvas)

Implementations should call the corresponding method in CircularRevealHelper.

Drawable getCircularRevealOverlayDrawable()

Returns the circular reveal overlay drawable if one exists, or null.

int getCircularRevealScrimColor()

Implementations should call the corresponding method in CircularRevealHelper.

CircularRevealWidget.RevealInfo getRevealInfo()

Returns the current reveal info if one exists, or null.

boolean isOpaque()

Implementations should call the corresponding method in CircularRevealHelper.

void setCircularRevealOverlayDrawable(Drawable drawable)

Sets the circular reveal overlay drawable, which is an icon that's drawn above everything else, including the circular reveal scrim color.

void setCircularRevealScrimColor(int color)

Sets the circular reveal scrim color, which is a color that's drawn above this widget's contents.

void setRevealInfo(CircularRevealWidget.RevealInfo revealInfo)

Sets the current reveal info.

Inherited methods

From class java.lang.Object
From interface com.google.android.material.circularreveal.CircularRevealWidget

Public constructors

CircularRevealRelativeLayout

CircularRevealRelativeLayout (Context context)

Parameters
context Context

CircularRevealRelativeLayout

CircularRevealRelativeLayout (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

Public methods

actualDraw

void actualDraw (Canvas canvas)

Parameters
canvas Canvas

actualIsOpaque

boolean actualIsOpaque ()

Returns
boolean

buildCircularRevealCache

void buildCircularRevealCache ()

Prepares the reveal info property to be modified. See the interface javadoc for usage details.

Implementations should call the corresponding method in CircularRevealHelper.

destroyCircularRevealCache

void destroyCircularRevealCache ()

Cleans up after the reveal info property is reset. See the interface javadoc for usage details.

Implementations should call the corresponding method in CircularRevealHelper.

draw

void draw (Canvas canvas)

Implementations should call the corresponding method in CircularRevealHelper.

Parameters
canvas Canvas

getCircularRevealOverlayDrawable

Drawable getCircularRevealOverlayDrawable ()

Returns the circular reveal overlay drawable if one exists, or null.

Implementations should call the corresponding method in CircularRevealHelper.

Returns
Drawable

getCircularRevealScrimColor

int getCircularRevealScrimColor ()

Implementations should call the corresponding method in CircularRevealHelper.

Returns
int

getRevealInfo

CircularRevealWidget.RevealInfo getRevealInfo ()

Returns the current reveal info if one exists, or null. The radius of the reveal info will never be greater than the distance to the furthest corner.

Implementations should call the corresponding method in CircularRevealHelper.

Returns
CircularRevealWidget.RevealInfo

isOpaque

boolean isOpaque ()

Implementations should call the corresponding method in CircularRevealHelper.

Returns
boolean

setCircularRevealOverlayDrawable

void setCircularRevealOverlayDrawable (Drawable drawable)

Sets the circular reveal overlay drawable, which is an icon that's drawn above everything else, including the circular reveal scrim color.

Implementations should call the corresponding method in CircularRevealHelper.

Parameters
drawable Drawable

setCircularRevealScrimColor

void setCircularRevealScrimColor (int color)

Sets the circular reveal scrim color, which is a color that's drawn above this widget's contents.

Because the scrim makes no assumptions about the shape of the view's background and content, callers should ensure that the scrim is only visible when the circular reveal does not yet extend to the edges of the view.

Implementations should call the corresponding method in CircularRevealHelper.

Parameters
color int

setRevealInfo

void setRevealInfo (CircularRevealWidget.RevealInfo revealInfo)

Sets the current reveal info. Care should be taken to call buildCircularRevealCache() and destroyCircularRevealCache() appropriately. See the interface javadoc for usage details.

Note that on L+, calling this method doesn't result in any visual changes. You must use this with ERROR(/ViewAnimationUtils).

Implementations should call the corresponding method in CircularRevealHelper.

Parameters
revealInfo CircularRevealWidget.RevealInfo