Theme and Locale

Locale

Apptics UI such as In-App Feedback, Consent, and In-App Ratings, support 20+ languages. By default, the UI will use the device locale and there are methods provided to change the locale in the App runtime.

Copiedval locale = Locale("en", "US")
AppticsSettings.setLocale(locale)

Supported languages

cs-CZda-DKde       de-DE
eses-ESes-MXfr
fr-CAfr-FRin-IDit-IT
jaja-JPko-KRnl-NL
plpl-BRpl-PLru-RU
sv-SEtrtr-TRzh-CN
zh-TWZh  

Theme

You can customize the theme of Apptics UI for In-App Feedback, Version alerts, Cross-promotion, and consent by using style resources. There are separate methods provided to set the style resource for activities and alert dialogs.

Sample theme for Activity

Copied<style name="AppticsTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="textColorPrimary">@android:color/black</item>
        <item name="textColorSecondary">@color/textblackheader</item>
        <item name="dividerColor">@android:color/darker_gray</item>
        <item name="iconFillColor">@color/white</item>
        <item name="iconFillColorSelected">@android:color/black</item>
        <item name="attachmentBorderSolid">@color/white</item>
        <item name="attachmentBorderStroke">@android:color/darker_gray</item>
    </style>

The below attributes are used only for customizing In-app feedback. Do not specify these attributes if the feedback module is not added to your project.

  • textColorPrimary - used as the text color
  • textColorSecondary - used as the hint text color
  • dividerColor - used as the color for a divider that separates the UI elements
  • iconFillColor - used as the icon color (Feedback module)
  • iconFillColorSelected - used as the icon color on the selected state (Feedback module)
  • attachmentBorderSolid - used as the attachment layout background solid (Feedback module)
  • attachmentBorderStroke - used as the attachment layout background stroke (Feedback module)

Sample theme for Alert Dialogs

Copied <style name="AppticsPopupTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
        <item name="colorAccent">@color/colorPrimary</item>
        <item name="appticsAlertPrimaryTextColor">@color/black</item>
        <item name="appticsAlertSecondaryTextColor">@color/themeGrey</item>
        <item name="appticsAlertInversedThemeColor">@color/white</item>
    </style>
  • colorAccent - used for action button colors

The below attributes are used only for customizing In-app update alerts. Do not specify these if In-App udpate module is not added to your project.

  • appticsAlertPrimaryTextColor - used for the pop-up title
  • appticsAlertSecondaryTextColor - used for the pop-up description
  • appticsAlertInversedThemeColor - It should be a contrast for colorAccent. Used as the text color for the update action button.

Use the below methods to set the style resources.

CopiedAppticsSettings.setThemeRes(R.style.AppticsFeedbackTheme)

AppticsSettings.setPopupThemeRes(R.style.AppticsPopupTheme)