Theming
By default the SDK matches your app. At runtime it reads your theme's colors, fonts, corner radius, button style, type scale and dark mode, and the rewards UI uses them. Layout and motion come from the Flyy UI variant; your app supplies the colors, fonts and shapes.
What's captured
| Android | iOS | |
|---|---|---|
| Colors | Material 3 / Material 2 / AppCompat theme attrs, Compose MaterialTheme.colorScheme | Tint and system colors, trait collection |
| Fonts | res/font files and <font-family> XML, Compose Font(R.font.x) | Fonts listed in UIAppFonts |
| Shapes | shapeAppearance*, materialButtonStyle, Compose shapes | — |
| Text size | fontScale / Compose density | Dynamic Type |
| Dark mode | Theme / uiMode | userInterfaceStyle, SwiftUI colorScheme |
Changes apply live. Switch dark mode or font size and open Flyy surfaces update without reloading.
Contrast is checked: any text color below WCAG 4.5:1 (3:1 for button labels) is replaced with black or white.
Overrides
- Android
- iOS
Flyy.start(this) {
partnerId = "…"
themeColor = "#7C3AED"
hostTheme = mapOf(
"colors.primary" to "#C2138F",
"shape.button" to 24,
)
}
// Compose: read the theme explicitly, inside your app theme
Flyy.hostTheme(MaterialTheme)
Flyy.initialize(FlyyConfig(
partnerId: "…",
themeColor: "#7C3AED",
hostTheme: ["colors.primary": "#C2138F", "shape.button": 24]
))
Precedence
Highest first:
- Per-placement theme set in GameStudio
- Explicit config —
themeColors, custom fonts,themeColor - Captured app theme (
matchHostTheme) - The UI variant's defaults
To stop matching your app, set matchHostTheme = false. Font scale is always respected for accessibility.
v1 theme setters
setThemeColor, setThemeColors, setDarkThemeColor and setCustomFontName
still work and rank at level 2.