0

I have this problem of a tablelayout performance related issue. If I have a very long list then there is a noticeable lag when it try to draw all the rows. I know that for listview/gridview I can take advantage of the adapter object so that only visible area will be drawn.

However I need to control the number of columns per row depending on the text within each cell. so for one row could have only 1 column but for another row there could have 5 columns, thus I cannot use listview/gridview as I understand they all only support fix number of columns per row.

So is there any way around this? or I am stuck with writing my own code to determine the area I need to draw/update, this is very tricky as scrolling is involved.

Wei
  • 341
  • 2
  • 14

1 Answers1

0

You can and you have to use ListView and have different layout for every item. See this link for more info:

Android ListView with different layouts for each row

Community
  • 1
  • 1
jere_hr
  • 284
  • 3
  • 11