Action: CLOSE_SCREEN

Closing screen is a very important step in application designing. If screens are not closed, they will just stack on top of each other resulting in “out of memory error” eventually. Stacking screens may be annoying to the user.

To give the app designers the power to close screens as per the requirements CLOSE_SCREEN action is used. This action is used to close the current screen and popup the underlying screen.

Attributes Value Mandatory
action_name CLOSE_SCREEN Yes
event_list comma separated list of events, eg: TAP Yes
target number of screens or “screen name”. Default is number of screens to close = 1 No
close_target This attribute defines how whether the target screen should be closed or not. The attribute is only applicable when target="<screen name> attribute is specified. By default close_target="true" which means that target screen will be closed. close_target="false" specifies - close all screens upto target screen, but do not close target screen No

Examples

Example 1

In this example, on tapping the control, the current screen will be closed.

<action event_list="TAP" action_name="CLOSE_SCREEN"/>

Note

In Example 1, target is not specified, hence current screen will be closed

Example 2

In this example, on tapping the control, AVM will continue to close screens until the screen name = “userprofile” is found and closed.

<action event_list="TAP" action_name="CLOSE_SCREEN" target="userprofile">

Note

In Example 2

  • target=”userprofile”
  • close_target=”true” by default and need not be specified.

Example 3

In this example, on tapping the control, AVM will continue to close screens up to the screen name = “userprofile” is found. The “userprofile” will not be closed.

<action event_list="TAP" action_name="CLOSE_SCREEN" target="userprofile" close_target="false">

Note

In Example 3

  • target=”userprofile”
  • close_target=”false”

Example 4

In this example, on tapping the control, AVM will close 2 screen.

<action event_list="TAP" action_name="CLOSE_SCREEN" target="2">

Note

In Example 3

  • target=”2”