# ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId

# ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId

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.AndroidSeekableAnimatedImageResourceByResId)  
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.AndroidSeekableAnimatedImageResourceByResId "View this page in Java")

<br />

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

<br />

*** ** * ** ***

A seekable animated image resource that maps to an Android drawable by resource ID. The animation progress is bound to the provided dynamic float.

## Summary

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

|                                                                              ### 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.AndroidSeekableAnimatedImageResourceByResId#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.AndroidSeekableAnimatedImageResourceByResId#getAnimatedImageFormat())`()` Gets the format for the animated image.                                                                                                                                                                                                                                                  |
| [DynamicBuilders.DynamicFloat](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat)`?`                            | [getProgress](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#getProgress())`()` Gets a[androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat), normally transformed from certain states with the data binding pipeline to control the progress of the animation. |
| `@`[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.AndroidSeekableAnimatedImageResourceByResId#getResourceId())`()` Gets the Android resource ID, e.g. R.drawable.foo.                                                                                                                                                                                                                                                         |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                    | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#hashCode())`()`                                                                                                                                                                                                                                                                                                                      |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                              | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#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.  

### getProgress

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

```
fun getProgress(): DynamicBuilders.DynamicFloat?
```

Gets a[androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat), normally transformed from certain states with the data binding pipeline to control the progress of the animation. Its value is required to fall in the range of \[0.0, 1.0\]. Any values outside this range would be clamped. When the first value of the[androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat)arrives, the animation starts from progress 0 to that value. After that it plays from current progress to the new value on subsequent updates. If not set, the animation will play on load (similar to a non-seekable animated).  

### 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.  

### hashCode

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

### toString

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