public final class

ResourceBuilders.ImageResource

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ResourceBuilders.ImageResource

Overview

An image resource, which can be used by layouts. This holds multiple underlying resource types, which the underlying runtime will pick according to what it thinks is appropriate.

Summary

Methods
public static ResourceBuilders.ImageResourcefromProto(ResourceProto.ImageResource proto)

Creates a new wrapper instance from the proto.

public ResourceBuilders.AndroidAnimatedImageResourceByResIdgetAndroidAnimatedResourceByResId()

Gets a non-seekable animated image resource that maps to an Android drawable by resource ID.

public ResourceBuilders.AndroidImageResourceByResIdgetAndroidResourceByResId()

Gets an image resource that maps to an Android drawable by resource ID.

public ResourceBuilders.AndroidSeekableAnimatedImageResourceByResIdgetAndroidSeekableAnimatedResourceByResId()

Gets a seekable animated image resource that maps to an Android drawable by resource ID.

public ResourceBuilders.InlineImageResourcegetInlineResource()

Gets an image resource that contains the image data inline.

public ResourceProto.ImageResourcetoProto()

Returns the internal proto instance.

public java.lang.StringtoString()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Methods

public ResourceBuilders.AndroidImageResourceByResId getAndroidResourceByResId()

Gets an image resource that maps to an Android drawable by resource ID.

public ResourceBuilders.InlineImageResource getInlineResource()

Gets an image resource that contains the image data inline.

public ResourceBuilders.AndroidAnimatedImageResourceByResId getAndroidAnimatedResourceByResId()

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

public ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId getAndroidSeekableAnimatedResourceByResId()

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

Creates a new wrapper instance from the proto.

Returns the internal proto instance.

public java.lang.String toString()