Updated to Android Studio 1.3.1 and tried to configure dataBinding
Top level gradle file contains
dependencies { classpath 'com.android.tools.build:gradle:1.3.1' classpath 'com.android.databinding:dataBinder:1.0-rc1' }
Project gradle file contains
apply plugin: 'com.android.application' apply plugin: 'com.android.databinding' android { compileSdkVersion 22 buildToolsVersion '22.0.0'
but I'm getting following message
Source folders generated at incorrect location
Warning:Folder /Users/myname/workspace/discoveroom/android-client/Caldroid/build/data-binding-info/debug Warning:Folder /Users/myname/workspace/discoveroom/android-client/DiscoveroomAndroidClient/build/data-binding-info/debug Information:3rd-party Gradle plug-ins may be the cause
Data Binding allows you to effortlessly communicate across views and data sources. This pattern is important for many Android designs, including model view ViewModel (MVVM), which is currently one of the most common Android architecture patterns.
ViewBinding vs DataBinding The one and only function of View Binding is to bind the views in the code, while Data Binding offers some more options like Binding Expressions, which allows us to write expressions the connect variables to the views in the layout.
Data binding in AndroidUpdating the views from the data source is a simple one-way binding. In that case, you'll only access data from the data source and update the layout. Two-way data binding is nothing but updating the data source if there are any changes in the layout and vice versa.
Stay organized with collections Save and categorize content based on your preferences. The @={} notation, which importantly includes the "=" sign, receives data changes to the property and listen to user updates at the same time.
change
classpath 'com.android.databinding:dataBinder:1.0-rc1'
to
classpath 'com.android.databinding:dataBinder:1.0-rc4'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With