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.
- 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
Post a Comment