Kotlin and Android Development featuring Jetpack: viewModel had name vm in previous code example (version B4.0 page 88)

Hello Michael,

on page 88 of version B4.0 the name viewModel is used in this line:

this.viewModel = pickPlayersViewModel

In the previous code examples this xml data binding variable had a different name “vm”.
I think the line should be:

this.vm = pickPlayersViewModel

Am i correct?

Best regards

Keno Basedow

2 Likes

You are 100% correct! I thankfully had things right in the code that’s available with the book, but it wasn’t here. Thank you for catching this!