styles.xml
file:
asapp_primary
to be your brand’s primary color, and adjusting other colors when necessary for accessibility. asapp_primary
is used as the message bubble background in most buttons and other controls. The screenshot below shows the default theme (gray primary - center) and custom primary colors on the left and right.
asapp_on_background
and asapp_on_primary
. asapp_on_background
is used by other elements that might appear in front of the background. asapp_on_primary
is used for text and other elements that appear in front of the primary color.
ASAPPTheme.Chat
style.
The status bar color is asapp_status_bar
and toolbar colors are asapp_toolbar
(background), asapp_nav_button
, asapp_nav_icon
, and asapp_nav_text
(foreground).
asapp_background
asapp_separator_color
asapp_control_tint
asapp_control_secondary
asapp_control_background
asapp_success
asapp_warning
asapp_failure
asapp_messages_list_background
asapp_chat_bubble_sent_text
asapp_chat_bubble_sent_bg
asapp_chat_bubble_reply_text
asapp_chat_bubble_reply_bg
ASAPPCustomTextStyleHandler
. To set this optional handler use ASAPPStyleConfig.setTextStyleHandler
. Use the given ASAPPTextStyles
object to:
updateFonts
. If no new fonts are set, the system default will be used instead.ASAPPTextStyles
to see all overridable styles.
setTextStyleHandler
is called when an ASAPP activity is created. Use the given Context
object if you access resources to make sure that all customization uses correct resource qualifiers.For example: if a user is in chat and toggles Night Mode, the SDK automatically triggers an activity restart. Once the new activity is created, the SDK calls setTextStyleHandler
with the new night/day context, which will retrieve the correct color variants from your styles.ASAPPStyleConfig
.
setChatActivityTitle
. By default, the title will be aligned to start. For example:
setChatActivityToolbarLogo
. You can also center the header content by calling setIsToolbarTitleOrIconCentered(true)
. For example: