B4J Question [B4x Pages] Best way to simulate B4i and B4A behavior in B4J

MrKim

Well-Known Member
Licensed User
Longtime User
In B4A and B4i only the currently visible page is accessible. Hitting the back arrow takes you to the previous page. In B4J the behavior is different. You have to actually close the underlying page or it is still available (which is not necessarily a bad thing, with windows you have room to display multiple screens and this can be useful for certain apps.). While I can think of several ways to keep track of the previous page and open it they all seem convoluted and overly complicated to me.

As is my wont, I am probably overthinking it, so, before I embark on the task of simulating this behavior by tracking what was open in what order (probably with a map?) I thought if I would ask if anyone else has dealt with this issue and perhaps has a clean solution.

Thanks in advance for any ideas.
 

MrKim

Well-Known Member
Licensed User
Longtime User
You can show the next page with ShowPageAndRemovePreviousPages. You will need to track the pages yourself in order to start the correct page when the foreground page is closed.
I understand that. But where do you put the code to open the previous page? When you close a page the events don't know if you are going forward or backward.
I suppose I can set a flag if the user does something other than click the windows close button.
 
Upvote 0
Top