I am designing a layout that has 24 rows. Each row has 2 columns. And after every 3 or 4 rows there is a text view. Each row and text view has a click listener. On click of any row, I have to dynamically add text view to that particular row.
To do so, I have created a table layout that has total of 29 rows. 24 rows with 2 columns and instead of text view there is rows with 1 column. For each row there is separate listener and separate code for adding views to them. As a result, I my writing same lines of code for 24 times.This has made my application slow.
Is there any other way I can design my layout or optimize my code? Can I use list view instead of table layout?
Please help.
0 comments:
Post a Comment