Getting started
The OUDS Android library is compatible with Android 5.0 (API level 21) and higher.
1. Add library dependencies
Orange Unified Design System for Android is available through Maven Central Repository. To use it:
-
Open the
build.gradle
file of your application. -
Make sure that the
repositories
section includes Maven Central. For example:allprojects {
repositories {
google()
mavenCentral()
}
}Content copied to clipboard -
Add the OUDS library and the theme you want to use in the
dependencies
section.dependencies {
// ...
implementation("com.orange.ouds.android:ouds-core:0.2.0")
implementation("com.orange.ouds.android:ouds-theme-orange:0.2.0")
// ...
}Content copied to clipboard
2. Use OudsTheme
OudsTheme
is a Material theme extension for Jetpack Compose applications. Because OUDS supports multi-theme, you must specify the theme to use for your application.
Use OudsTheme
in your screens by providing the theme contract implementation available in the dependency you added in the previous step. In our example OrangeTheme
.
OudsTheme(themeContract = OrangeTheme()) {
// Use OUDS components or modules here for an interface
// matching the Orange Unified Design System
}
If you want to use a custom theme, you can create your own
OudsThemeContract
implementation or extendOrangeTheme
to create a customized theme close to that of Orange.
All modules:
Contains the main elements of the OUDS Android library.
Contains the raw tokens that can be used by any theme.
This is the interface between the library and the custom themes.
Contains the Orange theme.