Building a Custom Android ListAdapter
This is a snippet from the book “Kotlin and Android Development featuring Jetpack” by Michael Fazio, covering how to build a ListAdapter class for a native (Kotlin-based) Android app. A ListAdapter class is used along with a RecyclerView to display a list of items. The ListAdapter handles connecting the proper row data to a layout and sending all that information into the RecyclerView. Create a Custom List Adapter The PlayerSummaryAdapter class is responsible for managing all the PlayerSummary items in our list and handling how they’re displayed....