Data Binding Library

Download android eBook

Remarks

Setup

Before using data binding, you must enable the plugin in your build.gradle.

android {
    ....
    dataBinding {
        enabled = true
    }
}

Note: Data binding was added to the Android Gradle plugin in version 1.5.0

Binding class names

The data binding plugin generates a binding class name by converting your layout's file name to Pascal case and adding "Binding" to the end. Thus item_detail_activity.xml will generate a class named ItemDetailActivityBinding.

Resources

Related Examples

Stats

803 Contributors: 26
Wednesday, April 19, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook