Aller au contenu principal

Theme and modules

After connect, you use AzeooSDK.shared.theme for theming and AzeooSDK.shared.modules.nutrition and AzeooSDK.shared.modules.training for embedding and navigation.

Theme (AzeooSDK.shared.theme)

  • getMode() — Current theme mode (light / dark / system).
  • setMode(mode), setLightMode(), setDarkMode(), setSystemMode() — Set theme mode.
  • toggleMode() — Toggle between light and dark.
  • setPrimaryColor(color), setSecondaryColor(color) — Set colors (ARGB int).
  • setLightColors(themeConfig), setDarkColors(themeConfig) — Set full light/dark theme.
  • setTheme(themeConfig) — Set complete theme configuration.
  • resetToDefault() — Reset to default theme.
  • getCurrentTheme() — Get current theme configuration.

Nutrition module (AzeooSDK.shared.modules.nutrition)

Embedding:

  • getFragment(bottomSafeArea) — Returns a Fragment you can add to your layout.
  • getView(context, bottomSafeArea) — Returns a View for Compose or custom layouts.
  • ComposeView(bottomSafeArea) — Composable that embeds the nutrition UI.

Navigation (screen opening):

  • showDiary(dateTimestamp), showPlans(), showPlan(planId), showUserPlan()
  • showRecipes(), showRecipe(recipeId, recipeName)
  • showScanner(), showMobileScanner(), showSearch(), showCart()
  • showAddSelection(), showAddFood(), showAddMeal()
  • showHome()

State: getState(), resetState(), onViewDetached(), setBottomSafeArea(enabled).

Training module (AzeooSDK.shared.modules.training)

Embedding: Same pattern as nutrition: getFragment(), getView(), ComposeView().

Navigation:

  • showWorkouts(), showPlans(), showPlan(planId)
  • showExercises(), showExercise(exerciseId)
  • showProgress(), showSchedule(), showHome()

State: getState(), resetState(), onViewDetached(), setBottomSafeArea(enabled).

Example

// Theme
AzeooSDK.shared.theme.setDarkMode()
AzeooSDK.shared.theme.setPrimaryColor(Color.parseColor("#0284C7"))

// Embed nutrition in a fragment container
supportFragmentManager.beginTransaction()
.replace(R.id.container, AzeooSDK.shared.modules.nutrition.getFragment())
.commit()

// Open specific screens
AzeooSDK.shared.modules.nutrition.showDiary(null)
AzeooSDK.shared.modules.training.showWorkouts()

Next steps