September 2019
Intermediate to advanced
462 pages
11h 3m
English
The RecyclerView uses an adapter to display each row of data. We’ll use a new AirportAdapter class for this purpose, to display the status of each airport.
Create a new Kotlin class file named AirportAdapter.kt that will hold the class AirportAdapter. Let’s start with this initial code for the class in this file:
| | package com.agiledeveloper.airports |
| | |
| | import android.support.v7.widget.RecyclerView |
| | import android.view.LayoutInflater |
| | import android.view.View |
| | import android.view.ViewGroup |
| | import kotlinx.android.synthetic.main.airport_info.view.* |
| | |
| | class AirportAdapter : RecyclerView.Adapter<AirportViewHolder>() ... |
Read now
Unlock full access