ThumbnailTemplate


public final class ThumbnailTemplate
extends ControlTemplate

java.lang.Object
   ↳ android.service.controls.templates.ControlTemplate
     ↳ android.service.controls.templates.ThumbnailTemplate


A template for a Control that displays an image.

Summary

Inherited constants

Public constructors

ThumbnailTemplate(String templateId, boolean active, Icon thumbnail, CharSequence contentDescription)

Public methods

CharSequence getContentDescription()

The description of the image returned by ThumbnailTemplate#getThumbnail()

int getTemplateType()

The template type associated with this class.

Icon getThumbnail()

The Icon (image) displayed by this template.

boolean isActive()

Inherited methods

Public constructors

ThumbnailTemplate

Added in API level 31
public ThumbnailTemplate (String templateId, 
                boolean active, 
                Icon thumbnail, 
                CharSequence contentDescription)

Parameters
templateId String: the identifier for this template object This value cannot be null.

active boolean: whether the image corresponds to an active (live) stream.

thumbnail Icon: an image to display on the Control This value cannot be null.

contentDescription CharSequence: a description of the image for accessibility. This value cannot be null.

Public methods

getContentDescription

Added in API level 31
public CharSequence getContentDescription ()

The description of the image returned by ThumbnailTemplate#getThumbnail()

Returns
CharSequence This value cannot be null.

getTemplateType

Added in API level 31
public int getTemplateType ()

The template type associated with this class.

Returns
int ControlTemplate#TYPE_THUMBNAIL

getThumbnail

Added in API level 31
public Icon getThumbnail ()

The Icon (image) displayed by this template.

Returns
Icon This value cannot be null.

isActive

Added in API level 31
public boolean isActive ()

Returns
boolean