ControlTemplate
  public
  
  
  abstract
  class
  ControlTemplate
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | 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.
See also:
Summary
Constants | |
|---|---|
int | 
        
          TYPE_ERROR
          Type identifier of the template returned by   | 
    
int | 
        
          TYPE_NO_TEMPLATE
          Type identifier of   | 
    
int | 
        
          TYPE_RANGE
          Type identifier of   | 
    
int | 
        
          TYPE_STATELESS
          Type identifier of   | 
    
int | 
        
          TYPE_TEMPERATURE
          Type identifier of   | 
    
int | 
        
          TYPE_THUMBNAIL
          Type identifier of   | 
    
int | 
        
          TYPE_TOGGLE
          Type identifier of   | 
    
int | 
        
          TYPE_TOGGLE_RANGE
          Type identifier of   | 
    
Public methods | |
|---|---|
        
        
        static
        
        
        ControlTemplate
     | 
  
    
      
      getErrorTemplate()
      
      
     | 
  
        
        
        static
        
        
        ControlTemplate
     | 
  
    
      
      getNoTemplateObject()
      
      
        Get a singleton   | 
  
        
        
        
        
        
        String
     | 
  
    
      
      getTemplateId()
      
      
     | 
  
        abstract
        
        
        
        
        int
     | 
  
    
      
      getTemplateType()
      
      
        The template type associated with this class.  | 
  
Inherited methods | |
|---|---|
Constants
TYPE_ERROR
public static final int TYPE_ERROR
Type identifier of the template returned by getErrorTemplate().
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: -1 (0xffffffff)
TYPE_NO_TEMPLATE
public static final int TYPE_NO_TEMPLATE
Type identifier of ControlTemplate.getNoTemplateObject.
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: 0 (0x00000000)
TYPE_RANGE
public static final int TYPE_RANGE
Type identifier of RangeTemplate.
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: 2 (0x00000002)
TYPE_STATELESS
public static final int TYPE_STATELESS
Type identifier of StatelessTemplate.
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: 8 (0x00000008)
TYPE_TEMPERATURE
public static final int TYPE_TEMPERATURE
Type identifier of TemperatureControlTemplate.
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: 7 (0x00000007)
TYPE_THUMBNAIL
public static final int TYPE_THUMBNAIL
Type identifier of ThumbnailTemplate.
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: 3 (0x00000003)
TYPE_TOGGLE
public static final int TYPE_TOGGLE
Type identifier of ToggleTemplate.
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: 1 (0x00000001)
TYPE_TOGGLE_RANGE
public static final int TYPE_TOGGLE_RANGE
Type identifier of ToggleRangeTemplate.
 
 Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS
Constant Value: 6 (0x00000006)
Public methods
getErrorTemplate
public static ControlTemplate getErrorTemplate ()
| Returns | |
|---|---|
ControlTemplate | 
        a singleton ControlTemplate used for indicating an error in unparceling.
 This value cannot be null. | 
      
getNoTemplateObject
public static ControlTemplate getNoTemplateObject ()
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().
| Returns | |
|---|---|
ControlTemplate | 
        a singleton ControlTemplate to indicate no specific template is used by
         this Control
 This value cannot be null. | 
      
getTemplateId
public String getTemplateId ()
| Returns | |
|---|---|
String | 
        the identifier for this object.
 This value cannot be null. | 
      
getTemplateType
public abstract int getTemplateType ()
The template type associated with this class.
| Returns | |
|---|---|
int | 
        Value is TYPE_ERROR, TYPE_NO_TEMPLATE, TYPE_TOGGLE, TYPE_RANGE, TYPE_THUMBNAIL, TYPE_TOGGLE_RANGE, TYPE_TEMPERATURE, or TYPE_STATELESS |