# ResourceBuilders.AndroidAnimatedImageResourceByResId

# ResourceBuilders.AndroidAnimatedImageResourceByResId

Artifact:[androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/ResourceBuilders.java+class:androidx.wear.protolayout.ResourceBuilders.AndroidAnimatedImageResourceByResId)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId "View this page in Java")

<br />

```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
class ResourceBuilders.AndroidAnimatedImageResourceByResId
```

<br />

*** ** * ** ***

A non-seekable animated image resource that maps to an Android drawable by resource ID. The animation is started with given trigger, fire and forget.

## Summary

|                                                                                                                                                                                       ### Nested types                                                                                                                                                                                        |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[ResourceBuilders.AndroidAnimatedImageResourceByResId.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId.Builder) Builder for[AndroidAnimatedImageResourceByResId](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId) |

|                                                                              ### Public functions                                                                              |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                            | [equals](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#equals(java.lang.Object))`(obj: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                    | [getAnimatedImageFormat](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#getAnimatedImageFormat())`()` Gets the format for the animated image.                            |
| `@`[DrawableRes](https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [getResourceId](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#getResourceId())`()` Gets the Android resource ID, e.g. R.drawable.foo.                                   |
| [TriggerBuilders.Trigger](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TriggerBuilders.Trigger)`?`                                                 | [getStartTrigger](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#getStartTrigger())`()` Gets the trigger to start the animation.                                         |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                    | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#hashCode())`()`                                                                                                |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                              | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#toString())`()`                                                                                                |

## Public functions

### equals

```
fun equals(obj: Any?): Boolean
```  

### getAnimatedImageFormat

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun getAnimatedImageFormat(): Int
```

Gets the format for the animated image.  

### getResourceId

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun getResourceId(): @DrawableRes Int
```

Gets the Android resource ID, e.g. R.drawable.foo.  

### getStartTrigger

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun getStartTrigger(): TriggerBuilders.Trigger?
```

Gets the trigger to start the animation.  

### hashCode

```
fun hashCode(): Int
```  

### toString

```
fun toString(): String
```