Skip to main content

UI Theme Customization

You can change the colors of the Entrupy Android SDK screens so they match your app. The SDK reads three colors from a theme object you provide: background, foreground (text), and border.

This guide explains how to define and apply a custom theme, which screens it changes, and what stays in the default Entrupy styling.

note

SDK screens do not inherit your app's MaterialTheme or XML theme. Use EntrupyApp.theme to change their colors.

Branding Policy

The Entrupy logo is displayed on SDK screens as part of the branding policy. White-labeling is not permitted. Contact Entrupy for branding configuration details.

The EntrupyTheme interface​

EntrupyTheme has three nullable properties. Implement all three, and return null for any color you don't want to change. Each is an ARGB color int (@ColorInt Int?), the same value android.graphics.Color and ContextCompat.getColor return.

PropertyTypeWhat it colors
backgroundColorInt?Screen, card, and top bar backgrounds
foregroundColorInt?Primary text, titles, icons, and the titles of secondary and text buttons (such as Skip)
borderColorInt?Borders and separators on cards, containers, and outlined buttons

Each color falls back to the default Entrupy color on its own. If you leave a property null, the SDK paints that element exactly as it does without a theme.

The Upload Images screen with no theme and with two custom themes. backgroundColor paints the screen, the top bar, and the cards; foregroundColor paints the title, the back arrow, the section titles, and the image icons; borderColor paints the outlines of the cards. The gold View Image Guide link and the blue outlines on the image slots keep their default colors.

Default Entrupy theme Default Entrupy theme: no theme set

Light theme Light theme: white background, black foreground, light gray border

Black theme Black theme: black background, white foreground, dark gray border

Defining a custom theme​

Create a class that implements EntrupyTheme and set the colors you want.

// Kotlin
import android.graphics.Color
import com.entrupy.sdk.model.EntrupyTheme

class MyAppEntrupyTheme : EntrupyTheme {
override val backgroundColor: Int? = Color.WHITE
override val foregroundColor: Int? = Color.BLACK
override val borderColor: Int? = Color.LTGRAY
}
// Java
import android.graphics.Color;
import com.entrupy.sdk.model.EntrupyTheme;

public class MyAppEntrupyTheme implements EntrupyTheme {
@Override public Integer getBackgroundColor() { return Color.WHITE; }
@Override public Integer getForegroundColor() { return Color.BLACK; }
@Override public Integer getBorderColor() { return Color.LTGRAY; }
}

A theme can set only some of the colors:

class MyDarkEntrupyTheme : EntrupyTheme {
override val backgroundColor: Int? = Color.BLACK
override val foregroundColor: Int? = Color.WHITE
override val borderColor: Int? = null // keeps the default border color
}

If you set a light backgroundColor, also set foregroundColor. The default text color is white, so a light background with no foreground leaves text hard to read.

Applying the custom theme​

Assign an instance of your theme to EntrupyApp.sharedInstance().theme at app launch, before you present any SDK screen.

// Kotlin
import android.app.Application
import com.entrupy.sdk.app.EntrupyApp

class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
EntrupyApp.init(this)
EntrupyApp.sharedInstance().theme = MyAppEntrupyTheme()

// ... continue with the rest of your setup ...
}
}
// Java
import android.app.Application;
import com.entrupy.sdk.app.EntrupyApp;

public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
EntrupyApp.init(this);
EntrupyApp.sharedInstance().setTheme(new MyAppEntrupyTheme());

// ... continue with the rest of your setup ...
}
}

Set the theme before you open an SDK flow, and don't change it while one is open. Changing theme, or setting it to null to return to the default Entrupy styling, applies to SDK flows opened after that point; changing it while a flow is open can leave that flow with a mix of old and new colors. If Android recreates an open SDK screen (for example, after a switch between light and dark mode), that screen picks up the current theme.

Screens the theme affects​

A configured theme applies to these screens:

  • The capture flow, including the brand menu, the Upload Images screen, the image guide, and fingerprint capture
  • Retake capture
  • The result detail screen, its menu, the flag dialog, and the timeline
  • Market Edge, including RegionPreferencesScreen when you embed it in your own UI
  • Certificate and certificate transfer screens

Status bar​

On SDK screens, the status bar icons follow the theme background: light backgrounds get dark icons and dark backgrounds get light icons. When the theme has a background color, this takes precedence over setStatusBarIconStyle. When it has none, or no theme is set, the style you set with setStatusBarIconStyle still applies:

import com.entrupy.sdk.model.StatusBarIconStyle

// Only used when the theme has no backgroundColor
EntrupyApp.sharedInstance().setStatusBarIconStyle(StatusBarIconStyle.DARK)
ValueIcon ColorBest For
StatusBarIconStyle.LIGHTWhiteDark backgrounds (default)
StatusBarIconStyle.DARKBlackLight backgrounds

RegionPreferencesScreen is the exception: when you embed it in your own UI, it takes the theme colors but leaves your status bar as you set it.

What the theme does not change​

These keep the default Entrupy styling with or without a theme:

  • Gold buttons and gold borders
  • Banners and the pull-to-refresh indicator
  • Result state and other semantic colors (for example, authentic or unidentified indicators)
  • Muted grey helper text
  • The live camera feed and the controls drawn over it, such as zoom and overlay opacity (the bars, instructions, and text around the feed follow the theme)
  • System UI such as permission dialogs and share sheets

Default styling​

When no theme is set, the SDK uses the default Entrupy styling: dark navy backgrounds, white text, and gold accents. When a theme leaves a property null, only that color falls back to its default; the colors the theme sets still apply.

Best Practices​

  • Early Application: Set the theme in Application.onCreate, before presenting any SDK screen, so every screen uses it from its first appearance. The SDK does not save the theme: if Android restarts your app's process while an SDK screen is open, the screen comes back with whatever theme your app sets on startup. Setting it in an Activity instead would bring those screens back in the default styling.
  • Contrast and Accessibility: Keep enough contrast between backgroundColor and foregroundColor. Remember that gold buttons and semantic colors are not themed, so check that they stay readable on your background.
  • Light and dark mode: The theme is a fixed set of colors; the SDK does not switch it for you. To follow the system dark mode, assign the theme that matches the current mode before you present an SDK screen.
  • Test Thoroughly: Run each SDK flow you use (capture, retake, result detail, flagging) with your theme on a device.
  • Check SDK Updates: Review this page when you update the SDK, in case the interface or the list of themed screens changes.

Next Steps​