# RoundedDrawable

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:wear:28.0.0-alpha1  
Summary:[XML Attrs](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#lattrs)\|[Ctors](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#pubctors)\|[Methods](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#)  

# RoundedDrawable

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
RoundedDrawable
`  
`


``

extends `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`


``


`

|---|---|---------------------------------------------|
| java.lang.Object                                  |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | android.support.wear.widget.RoundedDrawable |

<br />

*** ** * ** ***

Maintains and draws a drawable inside rounded rectangular bounds.

The drawable set by the[setDrawable(Drawable)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setDrawable(android.graphics.drawable.Drawable))method will be drawn within the rounded bounds specified by[setBounds(Rect)](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect))and[setRadius(int)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setRadius(int))when the[draw(Canvas)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#draw(android.graphics.Canvas))method is called.

By default, RoundedDrawable will apply padding to the drawable inside to fit the drawable into the rounded rectangle. If clipping is enabled by the[setClipEnabled(boolean)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setClipEnabled(boolean))method, it will clip the drawable to a rounded rectangle instead of resizing it.

The[setRadius(int)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setRadius(int))method is used to specify the amount of border radius applied to the corners of inner drawable, regardless of whether or not the clipping is enabled, border radius will be applied to prevent overflowing of the drawable from specified rounded rectangular area.

RoundedDrawable can be inflated from XML (supported above API level 24) or constructed programmatically. To inflate from XML, use[getDrawable(int)](https://developer.android.com/reference/android/content/Context.html#getDrawable(int))method.

#### Syntax:

```
 <?xml version="1.0" encoding="utf-8"?>
 <android.support.wear.widget.RoundedDrawable
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   android:src="drawable"
   app:backgroundColor="color"
   app:radius="dimension"
   app:clipEnabled="boolean" />
```

<br />

## Summary

|                                                                        ### XML attributes                                                                        ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [`RoundedDrawable_android_src`](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_android_src)         |   |
| [`RoundedDrawable_backgroundColor`](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_backgroundColor) |   |
| [`RoundedDrawable_clipEnabled`](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_clipEnabled)         |   |
| [`RoundedDrawable_radius`](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_radius)                   |   |

|                                                       ### Public constructors                                                       ||
|----------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[RoundedDrawable](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#RoundedDrawable())`() ` |

|                                                                                                                                                                                                                                                                                                                            ### Public methods                                                                                                                                                                                                                                                                                                                             ||
|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                        | ` `[draw](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#draw(android.graphics.Canvas))`(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` canvas) `                                                                                                                                                                                                                                                                                                                                                  |
| ` int`                                                                                         | ` `[getAlpha](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#getAlpha())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` int`                                                                                         | ` `[getBackgroundColor](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#getBackgroundColor())`() ` Returns the background color.                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | ` `[getDrawable](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#getDrawable())`() ` Returns the drawable that will be rendered.                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` int`                                                                                         | ` `[getOpacity](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#getOpacity())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` int`                                                                                         | ` `[getRadius](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#getRadius())`() ` Returns the border radius applied when rendering the drawable in pixels.                                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                        | ` `[inflate](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme))`(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` r, XmlPullParser parser, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` attrs, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` theme) ` |
| ` boolean`                                                                                     | ` `[isClipEnabled](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#isClipEnabled())`() ` Returns whether the drawable inside is clipped or resized to fit the rounded bounds.                                                                                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                        | ` `[setAlpha](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setAlpha(int))`(int alpha) `                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` void`                                                                                        | ` `[setBackgroundColor](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setBackgroundColor(int))`(int color) ` Sets the background color of the rounded drawable.                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                        | ` `[setClipEnabled](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setClipEnabled(boolean))`(boolean clipEnabled) ` Sets whether the drawable inside should be clipped or resized to fit the rounded bounds.                                                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                        | ` `[setColorFilter](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setColorFilter(android.graphics.ColorFilter))`(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` cf) `                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                        | ` `[setDrawable](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setDrawable(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` drawable) ` Sets the drawable to be rendered.                                                                                                                                                                                                                                                                        |
| ` void`                                                                                        | ` `[setRadius](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setRadius(int))`(int radius) ` Sets the border radius to be applied when rendering the drawable in pixels.                                                                                                                                                                                                                                                                                                                                                             |

|                                                                                                              ### Protected methods                                                                                                              ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onBoundsChange](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#onBoundsChange(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` bounds) ` |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#)From class` `[android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` ` |----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                                                    | ` applyTheme(`[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg0) `                                                                                                                                                                                                                                                  | | ` boolean`                                                                                                                 | ` canApplyTheme() `                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` clearColorFilter() `                                                                                                                                                                                                                                                                                                                                                      | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` copyBounds() `                                                                                                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` copyBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromPath(String arg0) `                                                                                                                                                                                                                                                                                                                                             | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3, `[BitmapFactory.Options](https://developer.android.com/reference/android/graphics/BitmapFactory.Options.html)` arg4) ` | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3) `                                                                                                                      | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromStream(InputStream arg0, String arg1) `                                                                                                                                                                                                                                                                                                                         | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1) `                                                                                                                                                                                                                                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg2) `                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                   | | ` abstract void`                                                                                                           | ` draw(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` arg0) `                                                                                                                                                                                                                                                                             | | ` int`                                                                                                                     | ` getAlpha() `                                                                                                                                                                                                                                                                                                                                                              | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` getBounds() `                                                                                                                                                                                                                                                                                                                                                             | | ` `[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)           | ` getCallback() `                                                                                                                                                                                                                                                                                                                                                           | | ` int`                                                                                                                     | ` getChangingConfigurations() `                                                                                                                                                                                                                                                                                                                                             | | ` `[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)                                | ` getColorFilter() `                                                                                                                                                                                                                                                                                                                                                        | | ` `[Drawable.ConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html) | ` getConstantState() `                                                                                                                                                                                                                                                                                                                                                      | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` getCurrent() `                                                                                                                                                                                                                                                                                                                                                            | | ` `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                              | ` getDirtyBounds() `                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                    | ` getHotspotBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getIntrinsicHeight() `                                                                                                                                                                                                                                                                                                                                                    | | ` int`                                                                                                                     | ` getIntrinsicWidth() `                                                                                                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getLayoutDirection() `                                                                                                                                                                                                                                                                                                                                                    | | ` final int`                                                                                                               | ` getLevel() `                                                                                                                                                                                                                                                                                                                                                              | | ` int`                                                                                                                     | ` getMinimumHeight() `                                                                                                                                                                                                                                                                                                                                                      | | ` int`                                                                                                                     | ` getMinimumWidth() `                                                                                                                                                                                                                                                                                                                                                       | | ` abstract int`                                                                                                            | ` getOpacity() `                                                                                                                                                                                                                                                                                                                                                            | | ` void`                                                                                                                    | ` getOutline(`[Outline](https://developer.android.com/reference/android/graphics/Outline.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` boolean`                                                                                                                 | ` getPadding(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` int[]`                                                                                                                   | ` getState() `                                                                                                                                                                                                                                                                                                                                                              | | ` `[Region](https://developer.android.com/reference/android/graphics/Region.html)                                          | ` getTransparentRegion() `                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                              | | ` void`                                                                                                                    | ` invalidateSelf() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isAutoMirrored() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isFilterBitmap() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isStateful() `                                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` isVisible() `                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                                                    | ` jumpToCurrentState() `                                                                                                                                                                                                                                                                                                                                                    | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` mutate() `                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                    | ` onBoundsChange(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                       | | ` boolean`                                                                                                                 | ` onLayoutDirectionChanged(int arg0) `                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` onLevelChange(int arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` boolean`                                                                                                                 | ` onStateChange(int[] arg0) `                                                                                                                                                                                                                                                                                                                                               | | ` static int`                                                                                                              | ` resolveOpacity(int arg0, int arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` scheduleSelf(Runnable arg0, long arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` abstract void`                                                                                                           | ` setAlpha(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setAutoMirrored(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` setCallback(`[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)` arg0) `                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setChangingConfigurations(int arg0) `                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                                                    | ` setColorFilter(int arg0, `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg1) `                                                                                                                                                                                                                                       | | ` abstract void`                                                                                                           | ` setColorFilter(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` arg0) `                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` setDither(boolean arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                                                    | ` setFilterBitmap(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setHotspot(float arg0, float arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setHotspotBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                                           | ` setLayoutDirection(int arg0) `                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` setLevel(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` setState(int[] arg0) `                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                                                    | ` setTint(int arg0) `                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setTintList(`[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)` arg0) `                                                                                                                                                                                                                                                   | | ` void`                                                                                                                    | ` setTintMode(`[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg0) `                                                                                                                                                                                                                                                    | | ` boolean`                                                                                                                 | ` setVisible(boolean arg0, boolean arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` unscheduleSelf(Runnable arg0) `                                                                                                                                                                                                                                                                                                                                           | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## XML attributes

### RoundedDrawable_android_src

<br />

<br />

**Related methods:**

- [setDrawable(Drawable)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setDrawable(android.graphics.drawable.Drawable))

### RoundedDrawable_backgroundColor

<br />

<br />

**Related methods:**

- [setBackgroundColor(int)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setBackgroundColor(int))

### RoundedDrawable_clipEnabled

<br />

<br />

**Related methods:**

- [setClipEnabled(boolean)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setClipEnabled(boolean))

### RoundedDrawable_radius

<br />

<br />

**Related methods:**

- [setRadius(int)](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#setRadius(int))

## Public constructors

### RoundedDrawable

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
RoundedDrawable ()
```

<br />

<br />

## Public methods

### draw

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

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

<br />

<br />

|        Parameters         ||
|----------|-----------------|
| `canvas` | `Canvas` <br /> |

### getAlpha

```
int getAlpha ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getBackgroundColor ()
```

Returns the background color.

<br />

|           Returns           ||
|-------|----------------------|
| `int` | an ARGB color <br /> |

### getDrawable

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Drawable getDrawable ()
```

Returns the drawable that will be rendered.

<br />

|                                                                                                        Returns                                                                                                        ||
|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)that will be rendered. <br /> |

### getOpacity

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getOpacity ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getRadius

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getRadius ()
```

Returns the border radius applied when rendering the drawable in pixels.

<br />

|            Returns             ||
|-------|-------------------------|
| `int` | radius in pixels <br /> |

### inflate

```
void inflate (Resources r, 
                XmlPullParser parser, 
                AttributeSet attrs, 
                Resources.Theme theme)
```

<br />

<br />

|             Parameters             ||
|----------|--------------------------|
| `r`      | `Resources` <br />       |
| `parser` | `XmlPullParser` <br />   |
| `attrs`  | `AttributeSet` <br />    |
| `theme`  | `Resources.Theme` <br /> |

|           Throws            ||
|--------------------------|---|
| `XmlPullParserException` |   |
| `IOException`            |   |

### isClipEnabled

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isClipEnabled ()
```

Returns whether the drawable inside is clipped or resized to fit the rounded bounds.

<br />

|                                  Returns                                   ||
|-----------|-----------------------------------------------------------------|
| `boolean` | `true`if the drawable is clipped,`false`if it's resized. <br /> |

### setAlpha

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setAlpha (int alpha)
```

<br />

<br />

|      Parameters       ||
|---------|--------------|
| `alpha` | `int` <br /> |

### setBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setBackgroundColor (int color)
```

Sets the background color of the rounded drawable.

<br />

**Related XML Attributes:**

- [RoundedDrawable_backgroundColor](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_backgroundColor)

|              Parameters              ||
|---------|-----------------------------|
| `color` | `int`: an ARGB color <br /> |

### setClipEnabled

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setClipEnabled (boolean clipEnabled)
```

Sets whether the drawable inside should be clipped or resized to fit the rounded bounds. If the drawable is animated, don't set clipping to`true`as clipping on animated drawables is not supported.

<br />

**Related XML Attributes:**

- [RoundedDrawable_clipEnabled](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_clipEnabled)

|                                               Parameters                                                ||
|---------------|------------------------------------------------------------------------------------------|
| `clipEnabled` | `boolean`:`true`if the drawable should be clipped,`false`if it should be resized. <br /> |

### setColorFilter

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setColorFilter (ColorFilter cf)
```

<br />

<br />

|         Parameters         ||
|------|----------------------|
| `cf` | `ColorFilter` <br /> |

### setDrawable

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDrawable (Drawable drawable)
```

Sets the drawable to be rendered.

<br />

**Related XML Attributes:**

- [RoundedDrawable_android_src](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_android_src)

|                                                               Parameters                                                                ||
|------------|-----------------------------------------------------------------------------------------------------------------------------|
| `drawable` | `Drawable`:[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)to be rendered <br /> |

### setRadius

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setRadius (int radius)
```

Sets the border radius to be applied when rendering the drawable in pixels.

<br />

**Related XML Attributes:**

- [RoundedDrawable_radius](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable#attr_RoundedDrawable_radius)

|                Parameters                ||
|----------|--------------------------------|
| `radius` | `int`: radius in pixels <br /> |

## Protected methods

### onBoundsChange

```
void onBoundsChange (Rect bounds)
```

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `bounds` | `Rect` <br /> |

-

  ## Interfaces

  - [CircularProgressLayout.OnTimerFinishedListener](https://developer.android.com/reference/android/support/wear/widget/CircularProgressLayout.OnTimerFinishedListener)
-

  ## Classes

  - [BoxInsetLayout](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout)
  - [BoxInsetLayout.LayoutParams](https://developer.android.com/reference/android/support/wear/widget/BoxInsetLayout.LayoutParams)
  - [CircularProgressLayout](https://developer.android.com/reference/android/support/wear/widget/CircularProgressLayout)
  - [CurvingLayoutCallback](https://developer.android.com/reference/android/support/wear/widget/CurvingLayoutCallback)
  - [RoundedDrawable](https://developer.android.com/reference/android/support/wear/widget/RoundedDrawable)
  - [SwipeDismissFrameLayout](https://developer.android.com/reference/android/support/wear/widget/SwipeDismissFrameLayout)
  - [SwipeDismissFrameLayout.Callback](https://developer.android.com/reference/android/support/wear/widget/SwipeDismissFrameLayout.Callback)
  - [WearableLinearLayoutManager](https://developer.android.com/reference/android/support/wear/widget/WearableLinearLayoutManager)
  - [WearableLinearLayoutManager.LayoutCallback](https://developer.android.com/reference/android/support/wear/widget/WearableLinearLayoutManager.LayoutCallback)
  - [WearableRecyclerView](https://developer.android.com/reference/android/support/wear/widget/WearableRecyclerView)