0

I want develop an app showing the scores of participants in a challenge. Challenge can have n number of rounds. I want to show the scores in a list where each row represents the score for a particular round. The first row would be: score of player 1, score of player 2, score of player 3

The number of players is not fixed. This is the challenge I am facing. I cannot implement using the standard recycler view and adapter with view holder pattern as I cannot statically define the layout for each row. Please suggest how can I implement this list.

png
  • 4,368
  • 7
  • 69
  • 118
  • Why can't you define the layout for each row? Surely you know what it will look like in advance? Also are you referring to `ListView` or `RecyclerView`? You've mentioned both. – Henry Twist Mar 31 '21 at 19:53

1 Answers1

0

Well you can create views within logic(java or kotlin instead of xml) inside your recyclerView adapter. Check this question

Or if you have the time for creating a custom class you can create it and use it in your inflated item of viewHolder / adapter.

Like this one I made for a Tag Layout. https://gist.github.com/alireza-nezami/ffdebb092f99cf147a9bab4b280f4397

Alireza Nezami
  • 515
  • 4
  • 12