InsightBranding
public
final
class
InsightBranding
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | 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 | |
|---|---|
class |
InsightBranding.Builder
Builder for |
Constants | |
|---|---|
int |
COLOR_TYPE_PRIMARY
Color type representing the primary color. |
int |
COLOR_TYPE_SECONDARY
Color type representing the secondary color. |
int |
ICON_TYPE_BACKGROUND
Icon type representing the background. |
int |
ICON_TYPE_LEADING
Icon type representing leading icons. |
int |
ICON_TYPE_TRAILING
Icon type representing trailing icons. |
Inherited constants |
|---|
Fields | |
|---|---|
public
static
final
Creator<InsightBranding> |
CREATOR
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
int
|
getColor(int type)
Gets the color for the specified color type, or |
SparseArray<Icon>
|
getIcons(int type)
Gets a mapping of position to icon for the specified icon type, or an empty
|
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
Constants
COLOR_TYPE_PRIMARY
public static final int COLOR_TYPE_PRIMARY
Color type representing the primary color.
Constant Value: 0 (0x00000000)
COLOR_TYPE_SECONDARY
public static final int COLOR_TYPE_SECONDARY
Color type representing the secondary color.
Constant Value: 1 (0x00000001)
ICON_TYPE_BACKGROUND
public static final int ICON_TYPE_BACKGROUND
Icon type representing the background.
Constant Value: 2 (0x00000002)
ICON_TYPE_LEADING
public static final int ICON_TYPE_LEADING
Icon type representing leading icons.
Constant Value: 0 (0x00000000)
ICON_TYPE_TRAILING
public static final int ICON_TYPE_TRAILING
Icon type representing trailing icons.
Constant Value: 1 (0x00000001)
Fields
Public methods
describeContents
public int describeContents ()
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.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or
|
getColor
public int getColor (int type)
Gets the color for the specified color type, or 0 if not set.
| Parameters | |
|---|---|
type |
int: Value is one of the following:
|
| Returns | |
|---|---|
int |
|
getIcons
public SparseArray<Icon> getIcons (int type)
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:
|
| Returns | |
|---|---|
SparseArray<Icon> |
This value cannot be null. |
writeToParcel
public void writeToParcel (Parcel dest, int flags)
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.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-28 UTC.