Google is committed to advancing racial equity for Black communities. See how.

MessageInfo.Builder

public static final class MessageInfo.Builder
extends Object

java.lang.Object
   ↳ com.google.android.libraries.car.app.navigation.model.MessageInfo.Builder


A builder of MessageInfo.

Summary

Public methods

MessageInfo build()

Constructs the MessageInfo defined by this builder.

MessageInfo.Builder setImage(CarIcon image)

Sets the image to display along with the message, or null to not display an image.

MessageInfo.Builder setText(CharSequence text)

Sets additional text on the message or null to not set any additional text.

MessageInfo.Builder setTitle(CharSequence title)

Sets the title of the message.

Inherited methods

Public methods

build

public MessageInfo build ()

Constructs the MessageInfo defined by this builder.

Returns
MessageInfo

setImage

public MessageInfo.Builder setImage (CarIcon image)

Sets the image to display along with the message, or null to not display an image.

Parameters
image CarIcon

Returns
MessageInfo.Builder

setText

public MessageInfo.Builder setText (CharSequence text)

Sets additional text on the message or null to not set any additional text.

Parameters
text CharSequence

Returns
MessageInfo.Builder

setTitle

public MessageInfo.Builder setTitle (CharSequence title)

Sets the title of the message.

Parameters
title CharSequence

Returns
MessageInfo.Builder

Throws
NullPointerException if message is null.