-
Notifications
You must be signed in to change notification settings - Fork 376
Installation
Add the following line to dependencies:
api 'tk.zielony:carbon:0.16.0.1'
Add data binding support to build.gradle. Carbon uses data binding for carbon.component:
android {
...
dataBinding {
enabled = true
}
}
To use Carbon with ProGuard add the following rules to ProGuard's config:
-dontwarn carbon.BR
-dontwarn carbon.internal**
-dontwarn java.lang.invoke**
-dontwarn android.databinding.**
-keep class android.databinding.** { *; }
Carbon uses Java 1.8. Add language compatibility options to build.gradle:
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
Use Carbon's themes. For example, declare your theme as:
<style name="AppTheme" parent="carbon_Theme.Light.NoActionBar"/>
Carbon adds a large number of widget attributes and these themes are setting them correctly. Using regular themes may result in weird errors in widget initialization methods.
Visit JitPack and follow the "How to" for the latest commit: https://jitpack.io/#ZieIony/carbon
Version 0.17.0 doesn't require data binding nor related ProGuard rules.
In case of any problems with these check the sample app.
Eclipse is not supported, please give Android Studio a shot – it’s pretty good and has Eclipse key shortcuts as well!
Copyright 2015 Marcin Korniluk 'Zielony'