I am working on an application that has a listview on the main page. I have a second activity that can be called that needs to delete list items and add/re-add list items from this second activity so they are updated when the user returns to the main page. The issue I am having is that I believe I need to use the CallSubDelayed2 to loop through and delete the records set for deletion by passing the index of each listview item to delete. I then have a second loop that goes through and adds/re-adds adjusted listview items.
The trouble I am running into is the second loop is adding records to the listview before the records are all deleted from the first loop thus I am getting errors when the Main.listview.size I am using to loop through is changing. I have tested that if I only run one loop or the other they work fine, just not when together.
Is there something not too complicated to insure that the second loop doesn't start until the first one has completed?
Thank you in advance for any advice.
Boa
The trouble I am running into is the second loop is adding records to the listview before the records are all deleted from the first loop thus I am getting errors when the Main.listview.size I am using to loop through is changing. I have tested that if I only run one loop or the other they work fine, just not when together.
Is there something not too complicated to insure that the second loop doesn't start until the first one has completed?
Thank you in advance for any advice.
Boa