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

author Reso Coder   5 мес. назад
8,562 views

222 Like   5 Dislike

Kotlin Coroutines Tutorial (STABLE VERSION) - async / await, withContext, launch

📗 Get the code from this tutorial 👇👇 https://resocoder.com/kotlin-coroutines-tutorial Maven repository for kotlinx-coroutines-core: https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core Start saving time now by planning weekly with Week Sweep: http://bit.ly/2Jf3QA0 With Kotlin 1.3 we finally have a stable library for coroutines. This means that there won't be any breaking changes to the API. Now is an especially good time to learn how to use them. Coroutines are basically light-weight, much more efficient threads. As a bonus, they are extremely easy to work with once you know the basics. Asynchronous coroutine code looks the same as a classic synchronous code. You don't need to learn any new programming paradigms in order to use Kotlin's coroutines. In this tutorial you are going to learn quite a bit about coroutines - different ways of launching them, blocking versus non-blocking code and async / await. Go to my website for more information, code examples and articles: ● http://resocoder.com Follow me on social media: ● https://www.facebook.com/resocoder ● https://twitter.com/resocoder

Kotlin - Apply, Let, Run, With, Also - Higher Order Standard Functions

Kotlin is all about simplifying the development. Kotlin's standard library is full of useful classes and functions which aim to fulfill this promise even where the built-in language features don't exist. One of such groups of functions in standard library are Kotlin's higher order functions apply, let, run, with and also. These functions allow you to write more concise, simpler code by removing code duplication. Warning! Once you start using them, you won't be able to imagine coding without them! Get the code from this tutorial: https://wp.me/p8jOJP-9i Go to my website for more information, code examples and articles: ● http://resocoder.com Follow me on social media: ● https://www.facebook.com/resocoder ● https://twitter.com/resocoder

Introduction to MVVM on Android - Tutorial - Learn Android Architecture Patterns

📗 Read the blog post about MVVM on Android👇👇 https://resocoder.com/mvvm-introduction-android Start saving time now by planning weekly with Week Sweep: http://bit.ly/2Jf3QA0 Making an Android app in itself is not all that hard once you get the basics right. Making a maintainable app is a whole different story. You have to give your code a firm structure, prevent yourself from putting all the code inside an activity or fragment and make many smaller classes which have a single responsibility. How can you achieve all of this? Architectural patterns! MVC, MVP, MVVM,… While anything is better than the dreaded “spaghetti code”, MVVM is one of the best options for Android development. It’s even fully supported and encouraged by Google with their first-party libraries. In this tutorial you are going to learn all you need to know to have an idea about what MVVM actually is. As much as I don’t like theory, sometimes it’s important to know it before jumping into actual coding. There is nothing worse than writing code which you don’t understand (been there done that 😢). Go to my website for more information, code examples and articles: ● http://resocoder.com Follow me on social media: ● https://www.facebook.com/resocoder ● https://twitter.com/resocoder

Data Binding 101 -- Polycasts #28

Curious to know how Polymer’s data binding system works under the hood? Today on Polycasts I’m kicking off a multi-part series to peel back the layers and reveal the mysteries of what Polymer does when your bindings update. Come check it out! Demo Source https://github.com/Polymer/polycasts/tree/master/ep28-data-binding-101/binding-demo Setters in JavaScript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set Polymer Slack: http://bit.ly/polymerslack Polymer G+ community: https://plus.google.com/communities/115626364525706131031 Subscribe to the Chrome Developers channel at: https://goo.gl/OUF4e2

Fun with LiveData (Android Dev Summit '18)

LiveData is a simple observable data holder that is aware of the lifecycle of the observers. It was designed to avoid memory leaks and null pointer exceptions between an activity or fragment and a ViewModel. However, you can also use LiveData beyond the ViewModel. Components like Room or Workmanager also expose LiveData observables, and you can make your own data sources lifecycle-aware. In this talk, we'll deep dive into patterns with LiveData such as the different types of transformations (map, switchMap and MediatorLiveData), handling events and building reactive architectures as well as common antipatterns and code-smells to avoid. Links: LiveData blogs → http://bit.ly/2PUpnWd Samples → http://bit.ly/2qzKbDN I/O app → http://bit.ly/2Ov1Vd3 Presented by: Jose Alcérreca & Yigit Boyar Android Dev Summit '18 all sessions playlist → http://bit.ly/ADS18-Sessions Subscribe to the Android Channel! → http://bit.ly/AndroidDevs1 #AndroidDevSummit"

📗 Get the code written in this tutorial 👇👇
https://resocoder.com/data-binding-livedata

Start saving time now by planning weekly with Week Sweep: http://bit.ly/2Jf3QA0

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.

Go to my website for more information, code examples and articles:
● http://resocoder.com

Follow me on social media:
● https://www.facebook.com/resocoder
● https://twitter.com/resocoder

Comments for video: