Lisa Wray — Data Binding in a Kotlin world

preview_player
Показать описание
— —
. . .
. If you like Butterknife, get ready to discover a whole new tool drawer. Data binding in 2017 is a stable framework that can drastically reduce boilerplate code and transform the way you write UI. Yes, even if you already use Kotlin extensions and RxJava. Animate, transition, and respond to user input without cluttering your code. Add your own custom properties to Android’s View classes (like android:font or android:imageUrl)! We'll start at the very beginning, discover tricks to supercharge your XML, and end in a deep dive to lambdas and two-way binding. No prior knowledge of data binding needed.
Рекомендации по теме
Комментарии
Автор

[Timeline]
2:39 What is data binding?
4:18 build.gradle (module)
4:48 example-view a dog
11:52 multiple binding
12:25 Property references
12:56 NPE safety
13:55 new XML attributes (14:11 Automatic setter, 14:50 renamed setter)
15:20 Custom binding adapter
16:58 Resources in expression
18:45 Observable data (24:19 Dependent properties)
24:56 Two-way binding
26:42 Event listeners
30:00 more examples
35:54 Plays well with others (RXJava, view binding frameworks, KTX, Dagger, Arch comp)
40:24 What's the catch?
41:06 What's the future?

kwounsulee
Автор

I still don't see the advantage of databinding. You just move the same amount of code from the Activity/Fragment and hide it in horrible xml

BigCarso
welcome to shbcf.ru