Added in API level 31
ThumbnailTemplate
class ThumbnailTemplate : ControlTemplate
| kotlin.Any | ||
| ↳ | 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(templateId: String, active: Boolean, thumbnail: Icon, contentDescription: CharSequence) |
|
| Public methods | |
|---|---|
| CharSequence |
The description of the image returned by |
| Int | |
| Icon |
The |
| Boolean |
isActive() |
| Inherited functions | |
|---|---|
Public constructors
ThumbnailTemplate
Added in API level 31
ThumbnailTemplate(
templateId: String,
active: Boolean,
thumbnail: Icon,
contentDescription: CharSequence)
| 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
fun getContentDescription(): CharSequence
The description of the image returned by ThumbnailTemplate.getThumbnail()
| Return | |
|---|---|
CharSequence |
This value cannot be null. |
getTemplateType
Added in API level 31
fun getTemplateType(): Int
| Return | |
|---|---|
Int |
ControlTemplate.TYPE_THUMBNAIL |
getThumbnail
Added in API level 31
fun getThumbnail(): Icon
The Icon (image) displayed by this template.
| Return | |
|---|---|
Icon |
This value cannot be null. |