Reputation: 219
I have learned how to add a button after an existing button dynamically, but is it possible to dynamically insert a button before something?
When "+ Add Person" is clicked, it will insert a button in between the very first button and the "+ Add Person" button.
Then it will extend the gridView vertically when it the maximum columns have been met.
Upvotes: 0
Views: 41
Reputation: 1384
I have a solution for your question. Here they are :
For the expand to next row, like screenshot number 2. You need to create logic to see if the ArrayList is exceed your maximum button count. Then the structure of layout will be different also. It will have :
Please ask if you need further explanation. Thank you !.
Upvotes: 1