InsightBranding
class InsightBranding : Parcelable
| kotlin.Any | |
| ↳ | android.app.personalcontext.insight.InsightBranding |
Branding assets for a ContextInsight.
When providing an insight, the understander can attach InsightBranding to indicate to the user which understander was responsible for generating the insight, and what data sources were used. Branding can be done by providing icons of different types (leading, trailing, background) and positions.
Summary
| Nested classes | |
|---|---|
|
Builder for |
|
| Constants | |
|---|---|
| static Int |
Color type representing the primary color. |
| static Int |
Color type representing the secondary color. |
| static Int |
Icon type representing the background. |
| static Int |
Icon type representing leading icons. |
| static Int |
Icon type representing trailing icons. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Int |
Gets the color for the specified color type, or |
| SparseArray<Icon!> |
Gets a mapping of position to icon for the specified icon type, or an empty |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<InsightBranding!> | |
Constants
COLOR_TYPE_PRIMARY
static val COLOR_TYPE_PRIMARY: Int
Color type representing the primary color.
Value: 0COLOR_TYPE_SECONDARY
static val COLOR_TYPE_SECONDARY: Int
Color type representing the secondary color.
Value: 1ICON_TYPE_BACKGROUND
static val ICON_TYPE_BACKGROUND: Int
Icon type representing the background.
Value: 2ICON_TYPE_LEADING
static val ICON_TYPE_LEADING: Int
Icon type representing leading icons.
Value: 0ICON_TYPE_TRAILING
static val ICON_TYPE_TRAILING: Int
Icon type representing trailing icons.
Value: 1Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getColor
fun getColor(type: Int): Int
Gets the color for the specified color type, or 0 if not set.
| Parameters | |
|---|---|
type |
Int: Value is one of the following: |
getIcons
fun getIcons(type: Int): SparseArray<Icon!>
Gets a mapping of position to icon for the specified icon type, or an empty SparseArray if no icons of the specified type are set.
| Parameters | |
|---|---|
type |
Int: Value is one of the following: |
| Return | |
|---|---|
SparseArray<Icon!> |
This value cannot be null. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|