The ViewModel & LiveData Tutorial in Android Studio (Kotlin)

preview_player
Показать описание
In this video I'll be creating avery easy increment app using a viewmodel with livedata, and this should cover the very basics and give you a general understanding on how you can use a viewmodel along with livedata.

def lifecycle_version = "2.2.0"

// ViewModel
// LiveData
​​​​
Рекомендации по теме
Комментарии
Автор

Simplest way to explain it
Don't get discouraged by less views bro
Your tutorials are easy to learn and very helpful

arpitgupta
Автор

This is exactly what I was looking for. Simple, concise and to the point

youshaarif
Автор

One possible change. Its better to put that business logic where you increment the number in the viewModel. Its not View's job to work on logic. It just has to call viewModel's method to update the count.

palaksdarji
Автор

Simple. And very powerful. One good and simple example is worth more than 1 billion words!

karateswe
Автор

Bro ...this is the best explanation I have come around... please make more tutorials such as this...

lifeOfCharlesMaina
Автор

Woww, this tutorial made things simple for me .thank you .

kirwakelvinkering
Автор

Wow man loved it, you made it very simple.

VIKASROYv
Автор

I can see the future when you do Dagger Hilt, MVVM, Testing, Coroutines, Retrofit, Room, WorkManager, Navigation in one app!

It's coming together 🧘

AwesomeDevNotes
Автор

Thank you so much. I was coding wrong my whole life 🤣

giocornejo
Автор

best explanation I have seen ever. Great work

jatinvashisht
Автор

Great video! Simple and direct to the point!

potavios
Автор

This video very helpful to me. Thank you man

alperencevlik
Автор

I wish it was possible to subscribe 1 million times.

chewataapp
Автор

no bullshitting no like subscribe comment, straight to point. very clear and precise. subscribed 🧡. wanna see more android stuff though

rma
Автор

Love you 😘 after many videos i found the right one

Codecxter
Автор

Amazing video bud, simple and good explanation.
Make a big project as well lol

iftak
Автор

Very helpful and understandable... Thx

emanalsbeiheen
Автор

Hi, Thanks for useful video regarding The ViewModel & LiveData Tutorial in Android Studio (Kotlin). I saw in the video that without defining the Button in the activity (like val as Button) you were using directly the button id of the layout. How you did that because Android Studio gets error of this syntax

farnadtohidkhah
Автор

Very good but getting an error cannot create an instance of class ViewModel

hilaltube
Автор

So, if I don't use an observer on the view model and just do setText on the textview in the button click listener, will the textview get reset after rotation?

SrichakradharReddyNagireddy