Zebra Design System components for Android.
This has been tested with compileSdkVersion 34
. Other sdk versions may require additional work.
- Add Zebra Maven repository to
settings.gradle
:
dependencyResolutionManagement {
repositories {
maven {
...
url "https://zebratech.jfrog.io/artifactory/zds-android/"
}
}
}
- Add dependency to app-level
build.gradle
dependencies {
...
implementation 'com.zebra:zds:1.0.0'
...
}
- To use and style the components in
AndroidManifest.xml
place in the application tag the base Zebra theme, and be sure to remove other styles if they could override this incorrectly.
<application
...
android:theme="@style/Theme.ZdsBase"
...
/>
- Use components. Example:
<com.zebra.zds.ZdsButton
style="@style/Zds.Button.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Button"
android:theme="@style/Zds.Button.Primary"/>