Back press with multifunction!

hi
how can i make the Back press with multifunction ,
i mean when pressed once goes back one step , when pressed again goes to another screen

thanks

Count the number of back button presses
Taifun

can u explain more pls

create a global variable and initialize it to 0
on each back button press increment that variable by 1

A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun

1 Like

can u pls show me in blocks, being looking for a video or tutorial but no luck …
i just want to add “open another screen screenName” to the back press button as to be the second click.
thanks
image

I’m close in doing it ?

Initialize the variable to 2
And move the open another screen block into an else statement

Then after first button click the variable will decrement and nothing happens, on second button click the screen will be closed

Taifun