android - Add multiple rows to ListView per item -


i have listview has custom arrayadapter custom xml row.

i passing in objects , words fine. however, want repeat each row 5 times within arrayadapter. in adapter, make minor adjustments each , current setup isn't feasible make adjustments prior passing in adapter.

is possible this? can't seem conjure correct search terms find hints.

there 2 ways know: 1. add repeated items dataset multiple times. since referencing same object pretty cheap.

  1. you can store number of repetitions in objects, , implement methods getcount(), getobject(), getview(), getitemid() remembering count of repetitions. f.e. if have foo object 2 repetitions , bar no repetitions getcount should return (2 + 1) + 1. count values in constructor or maybe when data set changes speed ui litle bit.

Comments

Popular posts from this blog

Glib GIOChannel -

jsp - java.sql.SQLException: [Microsoft][ODBC Microsoft Access > Driver] Too few parameters. Expected 1 -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -