This topic came up recently in couple threads. How can we create a tableView which allows expanding and collapsing of category rows such that records under these categories get hidden & revealed?
It would of course be wonderful if tableView widget in future had some public methods to do all this but till then I think we can figure out how to get by using our current means… Here goes another community challenge. I will get the ball rolling. Please do chip in.
This sample makes use of Corona Sample app called Listview2. I added a new element to the data table to contain collapsed state. In real life we would not expect our database to contain a flag like this but we would probably keep this info dynamically in another table. For now this should do to give you a starting point to take it away from…
Please note this is a real quick and dirty implementation. Probably much to be cleaned up. Please post improved versions or ideas. Enjoy!!!