When Main Screen is backpressed

Hello everyone!

I'm having a problem with my screens when I backpress them. (Vertical Arrengments that turn visible/invisible according to the app necessity). For example:
The main screen is Screen 1, and we have 2 arrengments called Screen 2 and Screen 3. When I open Screen 2 for example,Screens 1 and 3 will turn invisible. When I backpress, nothing happens. I made procedures to turn 1 screen visible and the others invisible. Is there any way to open the last screen (arrengment) used when I backpress the present screen?

Show all blocks that you use to change screens. Also those in the "BackPressed" event.

Use the Back Press Block :upside_down_face: Your code will need to record which screen to go back to.

In fact, my app has a total of 9 screens. And I don't know how to deal with it hehe...

Here is a tutorial for setting up multiple screens properly: https://puravidaapps.com/manager.php

But it looks like your using arrangements not screens so to get backspace to work with that you can set a global variable e.g. previous screen then set it when you switch to a new set or arrangements. Then check that variable in the Back Press block and call the appropriate screen switch procedure from there.

1 Like

Two things you should know ...

  • trim(length(text)) does not ignore trailing blanks in text. Use length(trim(text)) instead.
  • BackgroundImage should not accept color values, more likely image file names from the Media Folder.
1 Like

Got it man! Thank you very much!

Thanks ABG! I'm going to make it too! I just noticed that cause you said! hehe...