Skip to content

Customizing Zabaan


Zabaan CMS, you are offered a set of customizations that can be applied by default. Things like assistantSize, assistantPosition, assistantAnimation can be set via the CMS and changed on the fly. However, you may want to change these customizations for specific screens and override the default look.

Note: Screen-specific customization can be applied only in assistantAvailable callback of the AssistantStateListener to ensure that the default customization does not override the custom ones.

Customizing Assistant UI

To modify assistant's UI we provide a builder with multiple options to ensure that the assistant feels like a part of your application.

Using this builder will remove all the customizations which were set over the CMS related to Assistant's UI.

AssistantUi assistantUi = new AssistantUi.Builder()
    .setAssistantPosition(new CUSTOM_POSITION(gravity)) // optional
    .setSpeakAnimation(animation) // optional
    .setAssistantSize(height, width) // optional
    .setAssistantMargin(assistantMargin) // optional
    .setAssistantElevation(float) // optional
    .setSpeakAnimation(resDrawable) // optional
    .build();
Zabaan.getInstance().setAssistantUi(assistantUi);

Customizing Language Picker UI

To modify Language Picker's UI we provide a builder with similar options

Using this builder will remove all the customizations which were set over the CMS related to Language Picker.

LanguageScreenUi languageScreenUi = new LanguageScreenUi.Builder()
    .setLanguageTitleColor(hexColorString1)
    .setLanguageItemHighlightColor(hexColorString2)
    .setLanguagePickerBgGradientColor(twoColorList)
    .build();
Zabaan.getInstance().setLanguageScreenCustomization(languageScreenUi);
Back to top