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

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public final 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 |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html obj)` |
| `int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#getAnimatedImageFormat()()` Gets the format for the animated image. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#getProgress()()` Gets a `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat`, normally transformed from certain states with the data binding pipeline to control the progress of the animation. |
| `@https://developer.android.com/reference/androidx/annotation/DrawableRes int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#getResourceId()()` Gets the Android resource ID, e.g. R.drawable.foo. |
| `int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId#toString()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object obj)
```

### getAnimatedImageFormat

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

```
public int getAnimatedImageFormat()
```

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)

```
public @Nullable DynamicBuilders.DynamicFloat getProgress()
```

Gets a `https://developer.android.com/reference/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 `https://developer.android.com/reference/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)

```
public @DrawableRes int getResourceId()
```

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

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```