LiveData Explained - Android Architecture Component | Tutorial

preview_player
Показать описание
🏆 My Online Courses
⭐Discount Coupon: LAUNCH-STEVDZA-SAN

🐱‍👤 Wanna become a member? Join!

📸 Instagram

In this video I'm going to introduce you with LiveData. LiveData is a part of Android Architecture components like ViewModel for example. And if you haven't watched my video about ViewModel I highly recommend you to do that before you continue, because in this video we are going to use LiveData along with ViewModel.

LiveData is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services. This awareness ensures LiveData only updates app component observers that are in an active lifecycle state

Dependencies used in this video:
// Lifecycle components
//ViewModel

Timestamps
0:00 - Introducing with LiveData
2:15 - Practical Example - Countdown Timer
10:35 - Conclusion
Рекомендации по теме
Комментарии
Автор

Very informative, especially for beginners. Everything is clear, thank you a lot, and please keep going

rasulbekabdurasulov
Автор

I really like your style of teaching, to the point, and no fluff, looking forward to more Android courses.

nathann
Автор

nice explanation, thanks. There's one thing I did not understand though: why did you set timerValue (8:30) to a LiveData instead of a normal variable? What is the difference in this case?

nomonade
Автор

Super super helpful! Really great explanations. Thank you!

lucye
Автор

Thank you! this is so helpful, just a short question. How do you check if the countdown already started? because if you press start several times it will start over and over again showing all the seconds left in the same time. Keep making videos, the channel is amazing!

arielaguero
Автор

Your explanation is clear and you keep the content simple. I have done the first part of the work which is the only timer without buttons. It works fine except rotating the screen. I have just wanted to test whether ViewModel is working fine with the config changes(I have just learned that from your video as well :). It seems every screen rotate create a shadow timer and displaying those shadow seconds in the textView. Is there any solution you suggest? Thank you

erkany
Автор

This is the second of your videos from your channel where I learn a lot. You made them simple but very effectively to learn and replicate. It´s very easy to understand the concepts with your videos. Thanks a lot for your work. I hope you keep going on with this great job

khaxbiker
Автор

He went a little fast here, put it on 0.75 speed and you will understand easily, take it step by step

electrious_
Автор

I've never seen Kotlin. I'm going to watch some new courses, it looks awesome. Now I'll forget the Java and python I know. Gotta go back to taking notes

andy_de
Автор

For somone who is new to Kotlin and Android, you going to fast.

tarjep
Автор

Can this be done strictly with Java and NOT Kotlin!?

pickemparty
Автор

Thanks bro ! You are real cool ! Keep doing ! You are the best!

alishanvaliani
Автор

What's the point of having private MutableLiveData and exposing it as a LiveData?

RockRiderk
Автор

why not val seconds: LiveData<Int> get() = _seconds ??

vdrmkr
Автор

Hi Stevdza, I am not able to access livedata. It is not showing up at all. I check and its not private.

ismailkassim
Автор

could you show us how to use this in a recycler view?

SupertigerDev
Автор

You ran through the observer which was the only part that would be hard to understand.

nicklandreth
Автор

where can I start the MVVM pattern using Android?

yasserakbbach
Автор

this video helped me a lot. what a detailed & easy explanation !

vanilla
Автор

its unclear the layout or what is the id of it

hugovera
visit shbcf.ru