ASAP for Mobile Platforms

Customizing the Add-On UI

The ASAP SDK provides you with the option to customize the UI of the add-on as required.

Predefined Themes

The SDK UI comes with two predefined themes: light and dark. The following methods help you apply these themes.

Method for Applying the Light Theme (Default)

deskInstance.setThemeResource(R.style.deskTheme_Light);

Method for Applying the Dark Theme

deskInstance.setThemeResource(R.style.deskTheme_Dark);

Customized Themes

You can customize the overall theme of the SDK using the following line of code.

MyApplication.deskInstance.setThemeResource(R.style.deskTheme);

Theme resource must extend either deskTheme_Light or deskTheme_Dark.

The following image shows the attributes to customize in your theme.

Using Custom Fonts

The default font on the add-on UI is Roboto, but you can use other fonts of your choice too. 

The following code snippet lets you customize the font on the UI.

<style name="deskTheme" parent="deskTheme_Light">
	<!-- Customize your theme here. -->
	<item name="colorPrimary">@color/colorPrimary </item>
	<item name="colorPrimaryDark">@color/colorPrimaryDark </item>
	<item name="colorAccent">@color/colorAccent </item>
	<item name="android:fontFamily">@font/dosis_regular </item>
</style>

Note: If you do not use a custom font, the add-on displays the system font by default.