In order to use data binding, the Android project must be set up correctly. In this video, learn how to add data binding to your project Gradle file.
- [Instructor] In order to use data binding in your project, … you need to make a change to your project settings. … Data binding can be used with Android 4.0 and higher, … which corresponds to API level 14 and above. … You also need to make sure … that you are using at least a version 1.5 … of the gradle plugin with your project, … although it's best to just make sure … you're using the latest version. … So the data binding library is bundled … with the gradle plugin. … So you don't need to manually download it … or declare a dependency, … but you do need to enable the feature in your gradle file. … So let's open the gradle file for the app module. … And that's this one right here. … And you can see here, … there's a section called build features. … And what I've done here in the starting point … for this project is added a build feature … called data binding and set that to true. … Now I've already done this … for the start version of the project, … but in your own project, you're going to need to add this …
Author
Released
11/19/2020Skill Level Intermediate
Duration
Views
Related Courses
-
Android App Development: Communicating with the User
with Joe Marini1h 19m Intermediate
-
Introduction
-
What you should know1m 14s
-
Getting set up1m 37s
-
1. Overview
-
What is data binding?1m 51s
-
Doing things the old way4m 2s
-
Setting up your project1m 19s
-
-
2. Basic Data Binding
-
Create binding layout5m 13s
-
-
3. Layout Expressions
-
4. Binding to Observable Data
-
Overview of observables1m 51s
-
Binding to observables4m 49s
-
Binding to ViewModels6m 25s
-
Using binding adapters7m 19s
-
Two-way binding syntax4m 45s
-
Using converters4m 2s
-
-
Conclusion
-
Next steps1m
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Setting up your project