Group Group Group Group Group Group Group Group Group

Your Second Kotlin Android App

Just starting in Android Studio and Kotlin. I am using Android Studio 3.5. Much enjoyed Your First Kotlin Android App, so signed up to do the second. Got to episode “1.7. Challenge: Binding Data”. My code has errors that I cannot resolve. My ListSelectionViewHolder is the same as yours but doesn’t like second (unTyped) instance of “itemView”. Says “Type mismatch. Required View. Found View?”. Adding a “?” is not accepted. The only solution that works is deleting all the "?"s and then dropping the null test (now unnecessary) in ListSelectionRecyclerViewAdapter.

Also, in ListSelectionRecyclerViewAdapter, get error that the override for onCreateViewHolder overrides nothing and the function is “defined in androidx.recyclerview.widget.RecyclerView.Adapter”

In general, I am following, but there seem to be a lot of arbitrary constructs without explanation. It is early in the course and I am hoping that some underlying logic to what’s needed when, will come in time. Otherwise, I am left with “just follow the constructs because all you ever need to program any app is to provide tweaks to the constructs provided here”. Is that how it is?

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]