# CircularRevealLinearLayout

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/circularreveal/CircularRevealLinearLayout.java)

*** ** * ** ***


```
public class CircularRevealLinearLayout implements CircularRevealWidget
```

<br />

*** ** * ** ***

A CircularRevealWidget wrapper for LinearLayout.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#CircularRevealLinearLayout(Context)(Context context)` |
| `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#CircularRevealLinearLayout(Context,AttributeSet)(Context context, AttributeSet attrs)` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#actualDraw(Canvas)(Canvas canvas)` Calls super#draw(Canvas). |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#actualIsOpaque()()` Calls super#isOpaque(). |
| `void` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#buildCircularRevealCache()()` Prepares the reveal info property to be modified. |
| `void` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#destroyCircularRevealCache()()` Cleans up after the reveal info property is reset. |
| `void` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#draw(Canvas)(Canvas canvas)` Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`. |
| `Drawable` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#getCircularRevealOverlayDrawable()()` Returns the circular reveal overlay drawable if one exists, or null. |
| `int` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#getCircularRevealScrimColor()()` Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`. |
| `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealWidget.RevealInfo` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#getRevealInfo()()` Returns the current reveal info if one exists, or null. |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#isOpaque()()` Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`. |
| `void` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#setCircularRevealOverlayDrawable(Drawable)(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` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#setCircularRevealScrimColor(int)(int color)` Sets the circular reveal scrim color, which is a color that's drawn above this widget's contents. |
| `void` | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealLinearLayout#setRevealInfo(com.google.android.material.circularreveal.CircularRevealWidget.RevealInfo)(https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealWidget.RevealInfo revealInfo)` Sets the current reveal info. |

## Public constructors

### CircularRevealLinearLayout

```
public CircularRevealLinearLayout(Context context)
```

### CircularRevealLinearLayout

```
public CircularRevealLinearLayout(Context context, AttributeSet attrs)
```

## Public methods

### actualDraw

```
public void actualDraw(Canvas canvas)
```

Calls super#draw(Canvas).

The delegate should override draw to call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper` if the helper is non-null.

### actualIsOpaque

```
public boolean actualIsOpaque()
```

Calls super#isOpaque().

The delegate should override isOpaque to call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper` if the helper is non-null.

### buildCircularRevealCache

```
public void buildCircularRevealCache()
```

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

Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### destroyCircularRevealCache

```
public 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 `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### draw

```
public void draw(Canvas canvas)
```

Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### getCircularRevealOverlayDrawable

```
public Drawable getCircularRevealOverlayDrawable()
```

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

Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### getCircularRevealScrimColor

```
public int getCircularRevealScrimColor()
```

Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### getRevealInfo

```
public 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 `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### isOpaque

```
public boolean isOpaque()
```

Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### setCircularRevealOverlayDrawable

```
public 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 `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### setCircularRevealScrimColor

```
public 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 `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.

### setRevealInfo

```
public void setRevealInfo(CircularRevealWidget.RevealInfo revealInfo)
```

Sets the current reveal info. Care should be taken to call `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealWidget#buildCircularRevealCache()` and `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealWidget#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 ViewAnimationUtils.

Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`.