I have next data class
data class LegendWrapper(
val data: List<PlayerPerformance>? = emptyList()
)
data class PlayerPerformance(val name: String, val value: Int, val key: String)
data class TestList(val name: String, val data: LegendWrapper)
which I fill with data from Map
for((key, value ) in data.legends.all){
recList.add(TestList(key, value))
}
Further, by clicking on the name from the recyclerView, I want to transfer this list to another activity. How can I do it ?
i tried to do it like this
heroesAdapt = HeroesRecyclerAdapter(this, recList){
testList -> val heroesStatsActivity = Intent(this,HeroesStatsActivity::class.java)
heroesStatsActivity.putExtra("nicknameHeroes", testList.name)
heroesStatsActivity.putExtra("data", testList.data.toString())
startActivity(heroesStatsActivity)
}
But I get on another screen just a line with which I cannot work