Tutorial 2 Navigate between Screens

What you will learn in this Tutorial

How to Navigate between screens using NEXT_SCREEN action

Download Source Code - Tutorials - Source for this tutorial is in appemble-tutorial-screen-nav
Learn more FAQ
Good Read Controls , Actions, XMADL

Introduction

In an application one of the common user action is to open a new screen when a user taps on a current screen. An action is triggered on a specific EVENT attached to a CONTROL. In this tutorial you will learn that if you tap (event) on a button (control), you can go to the next screen. This navigation is achieved using an action called NEXT_SCREEN.

Download and Run Tutorials

This chapter uses source code from appemble-tutorial-screen-nav. If you have not downloaded tutorial source code, click on Download Source Code - Tutorials

Android - Right click on appemble-tutorial-screen-nav and click on Run as Android application.

iOS - Select scheme appemble-tutorial-screen-nav and iPhone x.x simulator. Click on Product -> Run.

FAQ

What are events and actions?

Events are triggered as a result of

  • User gestures like tap, long tap or flick etc
  • Application state change. For example, the event ON_CREATE_SCREEN is generated when a new screen is being created.

Actions are attached to the events and get executed when the events happen. An action can be NEXT_SCREEN which shows another screen, or fetch remote data using CALL_URL or refresh current screen using REFRESH_SCREEN. To see a complete list of events and action go to Events and Actions.


Is there a limit to number of actions attached for a control?

No there is no limit of actions attached to a control. You can attach one or more actions to a control. Good read Actions.