ChatMessageContextData.Builder
public
static
final
class
ChatMessageContextData.Builder
extends Object
| java.lang.Object | |
| ↳ | android.app.personalcontext.hint.ChatMessageContextData.Builder |
Builder for ChatMessageContextData.
Summary
Public constructors | |
|---|---|
Builder()
|
|
Public methods | |
|---|---|
ChatMessageContextData
|
build()
Builds the |
ChatMessageContextData.Builder
|
setAutofillId(AutofillId autofillId)
Sets the |
ChatMessageContextData.Builder
|
setRawDateString(String rawDateString)
Sets a user-friendly string representing the date of the message (e.g., "Today"). |
ChatMessageContextData.Builder
|
setRawTimeString(String rawTimeString)
Sets a user-friendly string representing the time of the message (e.g., "10:00 AM"). |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder ()
Public methods
build
public ChatMessageContextData build ()
Builds the ChatMessageContextData.
| Returns | |
|---|---|
ChatMessageContextData |
This value cannot be null. |
| Throws | |
|---|---|
NullPointerException |
if any of setRawTimeString(String), setRawDateString(String), and setAutofillId(AutofillId) are not set. |
setAutofillId
public ChatMessageContextData.Builder setAutofillId (AutofillId autofillId)
Sets the AutofillId of the view that this message corresponds to.
This is a required builder input.
| Parameters | |
|---|---|
autofillId |
AutofillId: This value cannot be null. |
| Returns | |
|---|---|
ChatMessageContextData.Builder |
This value cannot be null. |
setRawDateString
public ChatMessageContextData.Builder setRawDateString (String rawDateString)
Sets a user-friendly string representing the date of the message (e.g., "Today").
This is a required builder input and should be a string that is copied directly from the message view and provided as-is.
| Parameters | |
|---|---|
rawDateString |
String: This value cannot be null. |
| Returns | |
|---|---|
ChatMessageContextData.Builder |
This value cannot be null. |
setRawTimeString
public ChatMessageContextData.Builder setRawTimeString (String rawTimeString)
Sets a user-friendly string representing the time of the message (e.g., "10:00 AM").
This is a required builder input and should be a string that is copied directly from the message view and provided as-is.
| Parameters | |
|---|---|
rawTimeString |
String: This value cannot be null. |
| Returns | |
|---|---|
ChatMessageContextData.Builder |
This value cannot be null. |