The ViewModel & LiveData Tutorial in Android Studio (Kotlin)

  • 11 months ago
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
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
// LiveData
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"

Recommended