Package zendesk.answerbot
Class AnswerBotUiConfig.Builder
- java.lang.Object
-
- zendesk.answerbot.AnswerBotUiConfig.Builder
-
- Enclosing class:
- AnswerBotUiConfig
public static class AnswerBotUiConfig.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description UiConfigconfig()Create aUiConfigfor the configured options.Intentintent(Context context, java.util.List<UiConfig> uiConfigs)Create anIntentto start theAnswerBotActivitywith the specified configuration options.Intentintent(Context context, UiConfig... uiConfigs)Create anIntentto start theAnswerBotActivitywith the specified configuration options.voidshow(Context context, java.util.List<UiConfig> uiConfigs)DisplayAnswerBotActivityto the user.voidshow(Context context, UiConfig... uiConfigs)DisplayAnswerBotActivityto the user.AnswerBotUiConfig.BuilderwithBotAvatarDrawable(int avatarDrawableId)Specify the Drawable resource to use as the avatar for Answer Bot on the conversation interface.AnswerBotUiConfig.BuilderwithBotLabelString(java.lang.String botLabelString)Specify the String to use as the label displayed on Answer Bot's messages in the conversation interface.AnswerBotUiConfig.BuilderwithBotLabelStringRes(int stringResourceId)Specify the String resource to use as the label displayed on Answer Bot's messages in the conversation interface.
-
-
-
Method Detail
-
withBotLabelStringRes
public AnswerBotUiConfig.Builder withBotLabelStringRes(int stringResourceId)
Specify the String resource to use as the label displayed on Answer Bot's messages in the conversation interface. This is "Answer Bot" by default. If both this and #withBotLabelString() are provided, the value passes to #withBotLabelString takes precedence- Parameters:
stringResourceId- the String resource ID to be used as the label for Answer Bot's messages- Returns:
- the builder
-
withBotLabelString
public AnswerBotUiConfig.Builder withBotLabelString(java.lang.String botLabelString)
Specify the String to use as the label displayed on Answer Bot's messages in the conversation interface. If both this and #withBotLabelStringRes() are provided, this takes precedence- Parameters:
botLabelString- the String to be used as the label for AnswerBot's messages- Returns:
- the builder
-
withBotAvatarDrawable
public AnswerBotUiConfig.Builder withBotAvatarDrawable(int avatarDrawableId)
Specify the Drawable resource to use as the avatar for Answer Bot on the conversation interface. This is the Answer Bot logo by default.- Parameters:
avatarDrawableId- the Drawable resource ID to be used as the avatar for Answer Bot in the conversation interface.- Returns:
- the builder
-
show
public void show(Context context, UiConfig... uiConfigs)DisplayAnswerBotActivityto the user.- Parameters:
context- a validContextuiConfigs- Configurations for other Zendesk SDK activities that can be started from AnswerBotActivity.
-
show
public void show(Context context, java.util.List<UiConfig> uiConfigs)DisplayAnswerBotActivityto the user.- Parameters:
context- a validContextuiConfigs- Configurations for other Zendesk SDK activities that can be started from AnswerBotActivity.
-
config
public UiConfig config()
Create aUiConfigfor the configured options.
-
intent
public Intent intent(Context context, UiConfig... uiConfigs)Create anIntentto start theAnswerBotActivitywith the specified configuration options.- Parameters:
context- The context whichstartActivitywill be invoked onuiConfigs- Configurations for screen that can be started from AnswerBotActivity.- Returns:
- An
IntentforAnswerBotActivitywith the specified configuration options
-
intent
public Intent intent(Context context, java.util.List<UiConfig> uiConfigs)Create anIntentto start theAnswerBotActivitywith the specified configuration options.- Parameters:
context- The context whichstartActivitywill be invoked onuiConfigs- Configurations for screen that can be started from AnswerBotActivity.- Returns:
- An
IntentforAnswerBotActivitywith the specified configuration options
-
-