After reading Dynamically add elements to a listView Android , I understand clearly how to dynamically add row elements to a listView.
However, I have one idea that how to dynamically add column elements to a listview.
For example, there are 2 columns originally. After I click a button, I would like to add one one more column.
Can anyone provide example code?
Thank for all sharing.
After reading Dynamically add elements to a listView Android , I understand clearly how
Share
Just add rows dynamically, but make a custom view with two different elements… So there’ll be two elements on your every view of row. And first, set first items while seconds are invisible and after clicking button set others… So it’ll seem that you’re adding column…