Skip to main content

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​