CircularRevealCompat

public final class CircularRevealCompat
extends Object

java.lang.Object
   ↳ com.google.android.material.circularreveal.CircularRevealCompat


Defines compat implementations of circular reveal animations.

See also:

Summary

Public methods

static Animator createCircularReveal(CircularRevealWidget view, float centerX, float centerY, float startRadius, float endRadius)

Returns an Animator to animate a clipping circle.

static Animator createCircularReveal(CircularRevealWidget view, float centerX, float centerY, float endRadius)

Returns an Animator to animate a clipping circle.

static Animator.AnimatorListener createCircularRevealListener(CircularRevealWidget view)

Creates an AnimatorListener to be applied to either the Animator returned from createCircularReveal(CircularRevealWidget, float, float, float) or preferably to the overall AnimatorSet.

Inherited methods

Public methods

createCircularReveal

public static Animator createCircularReveal (CircularRevealWidget view, 
                float centerX, 
                float centerY, 
                float startRadius, 
                float endRadius)

Returns an Animator to animate a clipping circle.

This is meant to be used as a drop-in replacement for ViewAnimationUtils.createCircularReveal(View, int, int, float, float). In pre-L APIs, a backwards compatible version of the Animator will be returned.

You must also call createCircularRevealListener(CircularRevealWidget) and add the returned AnimatorListener to this Animator or preferably to the overall AnimatorSet.

Parameters
view CircularRevealWidget

centerX float

centerY float

startRadius float

endRadius float

Returns
Animator

createCircularReveal

public static Animator createCircularReveal (CircularRevealWidget view, 
                float centerX, 
                float centerY, 
                float endRadius)

Returns an Animator to animate a clipping circle. The startRadius will be the current CircularRevealWidget.getRevealInfo()'s CircularRevealWidget.RevealInfo.radius at the start of the animation.

This is meant to be used as a drop-in replacement for ViewAnimationUtils.createCircularReveal(View, int, int, float, float). In pre-L APIs, a backwards compatible version of the Animator will be returned.

You must also call createCircularRevealListener(CircularRevealWidget) and add the returned AnimatorListener to this Animator or preferably to the overall AnimatorSet.

Parameters
view CircularRevealWidget

centerX float

centerY float

endRadius float

Returns
Animator

createCircularRevealListener

public static Animator.AnimatorListener createCircularRevealListener (CircularRevealWidget view)

Creates an AnimatorListener to be applied to either the Animator returned from createCircularReveal(CircularRevealWidget, float, float, float) or preferably to the overall AnimatorSet.

Parameters
view CircularRevealWidget

Returns
Animator.AnimatorListener