Android Question How to wait for a page to close

I have a page that is loaded as a result of a menu item on the b4xmainpage. The actions performed on the second page mean that I want to refresh some elements on the main page. E. G. Change the page title.

I had put the call to a refresh sub following the showpage instruction in the menu click event thinking that it would wait for the second page to close before continuing. Wrong - I can now see that it actually carries on til end sub.
So my question is what is the normal /best way to handle this situation?

Thanks
Phil
 
In relation to pages opening and closing or appearing and disappearing, what is the correct / best way to leave/close a page? At the moment, for a page where I want to exit after the user selects an item, I call B4XPages.ClosePage(Me) from the click event after I've finished the required processing. Is this correct?
 
Upvote 0
Top