Data Binding with LiveData (Two-way & One-way) – Android Kotlin Tutorial

Managing the layout programmatically can be quite time consuming and verbose on Android. Even though Kotlin spares you of calling findViewById, accessing views in the activity code can still get ugly. When you use data binding, you can do most of the UI related stuff right in the XML layouts.

With LiveData, data binding becomes even more powerful and simple to use. While you could create observable fields even in the past when LiveData didn’t exist, this new life-cycle aware observable makes data binding even better and simpler.

In this tutorial you are going to learn how to use one-way and two-way data binding with LiveData and MVVM architecture.

👉Get the code from this tutorial👈

 

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.


Development made simple

Your success is our success. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved