AFCoreUI for Android
AFCoreUI for Android is a Jetpack Compose library that mirrors the SwiftUI surface in ui/afcore-ui-ios. It lives at ui/afcore-ui-android and is published as Gradle module :ui:afcore-ui-android.
Status
The library ships the full themed surface that mirrors the iOS package. Theme primitives (AFCoreUITheme, AFCoreUIColors, AFCoreUITheme.advantaHealthLight / advantaHealthDark) are in place, alongside primitives (AHCard, AHRing, AHBadge, AHBanner, AHEmptyState, AHHero, AHTrayNotification, AHHelpSheet, AHTopBar, AHShimmer) and feature views (WelcomeCarousel, PermissionsPrompt, ActivityCalendarView, CheckInSheet, BarcodeScannerView, FacilityMapView, SpotItDeckView).
See the ui/afcore-ui-android README for the full component inventory.
Adding to your app
While developing against the source layout (e.g., if you cloned the AFCore repo for your own SDK work):
settings.gradle.kts:
include(":ui:afcore-ui-android")
app/build.gradle.kts:
dependencies {
implementation(project(":ui:afcore-ui-android"))
}
Once published to GitHub Packages, the released coordinates will be:
implementation("com.advantahealth:ui-android:<latest-release>")
Theming
setContent {
AFCoreUITheme {
// your composables — Material 3 colorScheme is wired up
// to AFCoreUIColors under the hood
}
}
For a dark variant:
AFCoreUITheme(darkTheme = isSystemInDarkTheme()) { /* … */ }
For a custom palette, copy a built-in theme and override the color tokens you need (AFCoreUIColors carries the semantic roles):
val brand = AFCoreUITheme.advantaHealthLight.copy(
colors = AFCoreUIColors.advantaHealthLight.copy(
primary = Color(0xFF…),
accent = Color(0xFF…),
surface = Color(0xFF…),
label = Color(0xFF…),
),
)
AFCoreUITheme(theme = brand) { /* … */ }
Components
Each component mirrors its SwiftUI counterpart on the SwiftUI page one-for-one. Read the parameter lists and Compose previews from the source in ui/afcore-ui-android.