how to use viewmodel in fragment used in many activity android code example
Example: how to use by viewModels()
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
kotlinOptions {
jvmTarget = "1.8"
}