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

*** ** * ** ***


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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#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.AndroidAnimatedImageResourceByResId#getAnimatedImageFormat()()` Gets the format for the animated image. |
| `@https://developer.android.com/reference/androidx/annotation/DrawableRes int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#getResourceId()()` Gets the Android resource ID, e.g. R.drawable.foo. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/TriggerBuilders.Trigger` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#getStartTrigger()()` Gets the trigger to start the animation. |
| `int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.AndroidAnimatedImageResourceByResId#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.AndroidAnimatedImageResourceByResId#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.

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

### getStartTrigger

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

```
public @Nullable TriggerBuilders.Trigger getStartTrigger()
```

Gets the trigger to start the animation.

### hashCode

```
public int hashCode()
```

### toString

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