Android 12 Developer Preview is here! Try it out, and give us your feedback!

TemplateInfo

public final class TemplateInfo
extends Object

java.lang.Object
   ↳ androidx.car.app.model.TemplateInfo


Stores information about Template returned from a Screen.

This class is for use by host implementations and not by apps.

Summary

Public constructors

TemplateInfo(Class<? extends Template> templateClass, String templateId)

Constructs the info for the given template information provided.

Public methods

boolean equals(Object other)
Class<? extends Template> getTemplateClass()

Returns the type of template this instance contains.

String getTemplateId()

Returns the ID of the template.

int hashCode()

Inherited methods

Public constructors

TemplateInfo

public TemplateInfo (Class<? extends Template> templateClass, 
                String templateId)

Constructs the info for the given template information provided.

Parameters
templateClass Class: the class of the template this info is for

templateId String: the unique id for the template

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getTemplateClass

public Class<? extends Template> getTemplateClass ()

Returns the type of template this instance contains.

Returns
Class<? extends Template>

getTemplateId

public String getTemplateId ()

Returns the ID of the template.

Returns
String

hashCode

public int hashCode ()

Returns
int