see more Data Binding Guide.
- SimpleBindingActivity.java
- Hello World!
- ViewsWithIDsActivity.java
- Views With IDs sample. ViewHolder don't need anymore.
- AvoidingNullPointerExceptionActivity.java
- Generated data binding code automatically checks for nulls and avoid null pointer exceptions.
- IncludeDataBindingLayoutActivity.java
- Variables may be passed into an included layout's binding from the containing layout.
- AutoUpdateBindingActivity.java
- When the bound variable is updated, it will set the View automatically.
- ExpressionLanguageActivity.java
- MVVMActivity.java
- Implementation of MVVM Pattern using Data Binding.
- BindingAdapterActivity.java
- @BindingAdapter sample.
multi-dex-keep.txt
-keep public class * extends android.databinding.ViewDataBinding {
*;
}
build.gradle
android {
defaultConfig {
multiDexEnabled = true
multiDexKeepProguard file('multi-dex-keep.txt')
}
-dontwarn android.databinding.**