ControlTemplate
abstract class ControlTemplate
kotlin.Any | |
↳ | android.service.controls.templates.ControlTemplate |
An abstract input template for a Control
. Specifies what layout is presented to the user for a given Control
.
Some instances of Control
can originate actions (via user interaction) to modify its associated state. The actions available to a given Control
are determined by its ControlTemplate
.
Summary
Constants | |
---|---|
static Int |
Type identifier of the template returned by |
static Int |
Type identifier of |
static Int |
Type identifier of |
static Int |
Type identifier of |
static Int |
Type identifier of |
static Int |
Type identifier of |
static Int |
Type identifier of |
static Int |
Type identifier of |
Public methods | |
---|---|
open static ControlTemplate | |
open static ControlTemplate |
Get a singleton |
open String | |
abstract Int |
The template type associated with this class. |
Constants
TYPE_ERROR
static val TYPE_ERROR: Int
Type identifier of the template returned by getErrorTemplate()
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: -1
TYPE_NO_TEMPLATE
static val TYPE_NO_TEMPLATE: Int
Type identifier of ControlTemplate#getNoTemplateObject
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: 0
TYPE_RANGE
static val TYPE_RANGE: Int
Type identifier of RangeTemplate
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: 2
TYPE_STATELESS
static val TYPE_STATELESS: Int
Type identifier of StatelessTemplate
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: 8
TYPE_TEMPERATURE
static val TYPE_TEMPERATURE: Int
Type identifier of TemperatureControlTemplate
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: 7
TYPE_THUMBNAIL
static val TYPE_THUMBNAIL: Int
Type identifier of ThumbnailTemplate
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: 3
TYPE_TOGGLE
static val TYPE_TOGGLE: Int
Type identifier of ToggleTemplate
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: 1
TYPE_TOGGLE_RANGE
static val TYPE_TOGGLE_RANGE: Int
Type identifier of ToggleRangeTemplate
.
Value is android.service.controls.templates.ControlTemplate#TYPE_ERROR
, android.service.controls.templates.ControlTemplate#TYPE_NO_TEMPLATE
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE
, android.service.controls.templates.ControlTemplate#TYPE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_THUMBNAIL
, android.service.controls.templates.ControlTemplate#TYPE_TOGGLE_RANGE
, android.service.controls.templates.ControlTemplate#TYPE_TEMPERATURE
, or android.service.controls.templates.ControlTemplate#TYPE_STATELESS
Value: 6
Public methods
getErrorTemplate
open static fun getErrorTemplate(): ControlTemplate
Return | |
---|---|
ControlTemplate |
a singleton ControlTemplate used for indicating an error in unparceling. This value cannot be null . |
getNoTemplateObject
open static fun getNoTemplateObject(): ControlTemplate
Get a singleton ControlTemplate
, which supports no direct user input. Used by Control.StatelessBuilder
when there is no known state. Can also be used in Control.StatefulBuilder
for conveying information to a user about the Control
but direct user interaction is not desired. Since this template has no corresponding ControlAction
, any user interaction will launch the Control#getAppIntent()
.
Return | |
---|---|
ControlTemplate |
a singleton ControlTemplate to indicate no specific template is used by this Control This value cannot be null . |
getTemplateId
open fun getTemplateId(): String
Return | |
---|---|
String |
the identifier for this object. This value cannot be null . |
getTemplateType
abstract fun getTemplateType(): Int
The template type associated with this class.