Skip to main content

🧱 UI Components (Android)

The SDK provides two UI modules β€” Nutrition and Training β€” embeddable as a Fragment or a Compose view.

Concepts: Navigation Β· Destinations
Android: Navigation guide β€” examples, back gesture, deep links, admonitions

One-screen overview​

// 1. After connect, navigate anywhere with a typed destination.
sdk.navigate(AzeooDestination.Nutrition.Plan(id = "abc-123"))
sdk.navigate(AzeooDestination.Training.Workouts)
sdk.back()

// 2. Embed a module as a Fragment…
supportFragmentManager.beginTransaction()
.replace(R.id.container, sdk.modules.nutrition.getFragment())
.commitNow()

// 3. …or in Compose.
sdk.modules.nutrition.ComposeView(bottomSafeArea = true)

// 4. If you use a bottom nav (or rail / Jetpack Nav), install a coordinator
// so cross-module sdk.navigate(...) flips your native tab automatically.
sdk.setModuleContainer(AzeooBottomNavCoordinator(
bottomNav = findViewById(R.id.bottom_nav),
mapping = mapOf(
AzeooDestination.Module.NUTRITION to R.id.nav_nutrition,
AzeooDestination.Module.TRAINING to R.id.nav_training,
),
))