Theming
The AbleCredit SDK ships with a default light-green + black palette. You can replace any or all colours by declaring the same token names in your own res/values/colors.xml. Android's resource-merge system picks your value at build time – no SDK API call required.
How it works
- The SDK defines colour tokens prefixed with
ablecredit_in its ownres/values/colors.xml. - If your app declares a resource with the same name, the Gradle resource merge replaces the SDK's value.
- All SDK screens are recoloured automatically – no runtime config needed.
Colour tokens
| Token | Default | Used for |
|---|---|---|
ablecredit_primary | #FF66BB6A | Buttons, accents (light green) |
ablecredit_on_primary | #FF0A0A0A | Text / icons on primary colour |
ablecredit_accent | #FF66BB6A | Secondary accent (mirrors primary) |
ablecredit_surface | #FFFFFFFF | Card / screen backgrounds |
ablecredit_on_surface | #FF0A0A0A | Primary body text |
ablecredit_text_secondary | #FF5A5A5A | Secondary / label text |
ablecredit_text_tertiary | #FF9A9A9A | Hint / placeholder text |
ablecredit_text_muted | #FF3A3A3A | Muted / de-emphasised text |
ablecredit_divider | #FFE6E6E6 | List dividers, hairlines |
ablecredit_disabled | #FFCCCCCC | Disabled controls |
ablecredit_error | #FFB00020 | Error states |
ablecredit_warning | #FF8A5300 | Warning text |
ablecredit_warning_bg | #FFFFF8E1 | Warning banner background |
ablecredit_warning_stroke | #FFF0D58C | Warning banner border |
ablecredit_mic | (ablecredit_on_surface) | Microphone button icon tint |
Example – override primary brand colour
Add (or update) your app's res/values/colors.xml. You only need to include the tokens you want to change:
<resources>
<!-- Override AbleCredit SDK brand colours -->
<color name="ablecredit_primary">#0066FF</color> <!-- your brand blue -->
<color name="ablecredit_on_primary">#FFFFFF</color> <!-- white text on blue -->
<color name="ablecredit_accent">#0066FF</color>
</resources>Notes
- You do not need to override every token – unspecified tokens fall back to the SDK defaults.
- Dark-mode variants are not currently supported by the SDK; the default palette is light-mode only.
- The
tools:replace="android:theme"entry inAndroidManifest.xml(covered in Setup & Install) ensures your app theme governs the activity chrome; the colour tokens govern the SDK's internal UI.
Configure
AbleCredit.configure() authenticates the current user session against the AbleCredit backend. Call it once after the user logs in, before any loan or capture operations.
Mode 1 – Direct Calls
The lowest-level integration. Your app calls each SDK capture screen individually and owns all navigation between them. The SDK screens have no built-in "Next" button – they open, the user completes the task, and they close.