AgentforceDimensions
open class AgentforceDimensions : Dimensions
Agentforce dimensions extend Salesforce SharedUI Dimensions and use the existing dimensions slot on createCustomAgentforceThemeManager(...) and AgentforceThemeOverrides.
All theming types live in the package com.salesforce.android.agentforcesdk.components.theme.
The SDK-specific token is AgentforceSizing.messageTextMaximumWidth, which caps the width of agent-authored plain text, Markdown, and rich text.
| Type | Extends | Purpose |
|---|---|---|
AgentforceDimensions | SharedUI Dimensions | Pass this as the dimensions value. |
AgentforceSizing | SharedUI Sizing | Holds messageTextMaximumWidth. |
SharedUI exposes dimensions.sizing as the base type. Use agentforceSizing when you need to read messageTextMaximumWidth.
The dimensions parameter stays typed as SharedUI Dimensions so existing integrations remain source- and binary-compatible. Construct an AgentforceDimensions and pass it in.
Prefer a sparse AgentforceThemeOverrides bag. Leave dimensions unset to keep agent text unbounded.
For Java callers:
messageTextMaximumWidth is an optional sizing token. Rendering behavior is unchanged when you omit it.
| Behavior | Detail |
|---|---|
| Default | null (unbounded) |
| What it limits | Agent-authored plain text, Markdown, and rich text |
| What it doesn’t limit | User-authored messages |
| Invalid values | null, 0.dp or less, NaN, and infinities are treated as unbounded |
| Larger than the parent | The parent still wins; the token is an upper bound, not a stretch |
messageTextMaximumWidthDp is the Java-friendly Float? form of the same token.
- AgentforceThemeManager — exposes the active scale through
dimensions(). - AgentforceTypography — the text styles you pair with these sizes.
- Theming — the complete Android theming reference.