InsightDisplayDetails.Builder


public static final class InsightDisplayDetails.Builder
extends Object

java.lang.Object
   ↳ android.app.personalcontext.insight.InsightDisplayDetails.Builder


Builder for InsightDisplayDetails.

Summary

Public constructors

Builder(Icon icon)

Creates a new builder for the insight display details.

Builder(CharSequence title)

Creates a new builder for the insight display details.

Builder(CharSequence title, Icon icon)

Creates a new builder for the insight display details.

Public methods

InsightDisplayDetails build()

Builds the InsightDisplayDetails.

InsightDisplayDetails.Builder setContentDescription(CharSequence contentDescription)

Sets the content description of the insight.

InsightDisplayDetails.Builder setSubtitle(CharSequence subtitle)

Sets the subtitle of the insight.

Inherited methods

Public constructors

Builder

Added in version 37.2
public Builder (Icon icon)

Creates a new builder for the insight display details. Used when only the icon is available.

Parameters
icon Icon: the icon of the insight.
This value cannot be null.

Builder

Added in version 37.2
public Builder (CharSequence title)

Creates a new builder for the insight display details. Used when only the title is available.

Parameters
title CharSequence: the title of the insight.
This value cannot be null.

Builder

Added in version 37.2
public Builder (CharSequence title, 
                Icon icon)

Creates a new builder for the insight display details. Used when both the title and icon are available.

Parameters
title CharSequence: the title of the insight.
This value cannot be null.

icon Icon: the icon of the insight.
This value cannot be null.

Public methods

build

Added in version 37.2
public InsightDisplayDetails build ()

Builds the InsightDisplayDetails.

Returns
InsightDisplayDetails the InsightDisplayDetails.
This value cannot be null.

setContentDescription

Added in version 37.2
public InsightDisplayDetails.Builder setContentDescription (CharSequence contentDescription)

Sets the content description of the insight.

Parameters
contentDescription CharSequence: the content description of the insight. null can be specified to clear the content description.

Returns
InsightDisplayDetails.Builder This value cannot be null.

setSubtitle

Added in version 37.2
public InsightDisplayDetails.Builder setSubtitle (CharSequence subtitle)

Sets the subtitle of the insight.

Parameters
subtitle CharSequence: the subtitle of the insight. null can be specified to clear the subtitle.

Returns
InsightDisplayDetails.Builder This value cannot be null.