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 InsightBranding.

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
getColor(type: Int)

Gets the color for the specified color type, or 0 if not set.

SparseArray<Icon!>
getIcons(type: Int)

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.

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: 0

COLOR_TYPE_SECONDARY

static val COLOR_TYPE_SECONDARY: Int

Color type representing the secondary color.

Value: 1

ICON_TYPE_BACKGROUND

static val ICON_TYPE_BACKGROUND: Int

Icon type representing the background.

Value: 2

ICON_TYPE_LEADING

static val ICON_TYPE_LEADING: Int

Icon type representing leading icons.

Value: 0

ICON_TYPE_TRAILING

static val ICON_TYPE_TRAILING: Int

Icon type representing trailing icons.

Value: 1

Public 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:

Properties

CREATOR

static val CREATOR: Parcelable.Creator<InsightBranding!>