For my code I am passing in this for the context. This is in mainActivity.kt file
This is the error I am getting in my constructor I am calling it like this
class ForecastAdapter(val forecast: Forecast, val context: Context) : RecyclerView.Adapter<ForecastData>(){
and then I am passing it in the class like this:
runOnUiThread {
view.adapter = ForecastAdapter(weather, this)
}
So I have no idea why this isn't working for context. I am new to Kotlin and new to android dev so I am little confused right now.