1. Introduction
Extension name: AirdArrangementManagement
This extension makes it easy to manage the opening and closing, and therefore the visibility, of the different views, including a history.
The extension gives the possibility of opening several predefined views in one block during initialization, either by the name of the view or by its position in the initialization list.
In addition, the history provided allows you to go back to previous views (either by an event or by the BACK key)
Version 2
Adding returns of the WhenOpen method
Version 1
Name change
Thanks to @Taifun and @Mohamed_Tamer
2. Properties of the designer
None
3. Blocks
4. Documentation
4.1 Events
Triggered when the method Open is started
“arrangements” and “positions” are lists and return the open arrangements and, if so, the number of the position corresponding to the open arrangements and according to the initialized configuration.
Example: if you have initialized the “View1” arrangement at position 2 and you open, via the Open (“View1”) or Open (2) method then the WhenOpen method will return “View1” in the “arrangements” list and 2 in the “positions” list.
Triggered when the method Previous is started
4.2 Methods
To add another arrangement to the initialization list. You can also add an arrangement list. See example below.
Empty history
Close all arrangement initialized in the initialization list.
Return the number of “pages” in the history.
First of all it is necessary to initialize.
You must add a list, named Initialization List, which can contain either an arrangement or an arrangement list.
Return true or false.
You can test a arrangement, a list of arrangement, or even a position in the Initialization List.
Open a arrangement, a list of arrangements, a group of arrangement according to its position in the Initialization List.
Opens the previously opened arrangement(s), depending on the history.
5. Example
First of all it is necessary to initialize.
You must add a list, named Initialization List, which can contain either an arrangement or an arrangement list.
The initialization list in the example contains:
- in position 0 the view1 arrangement
- in position 1 the view2 arrangement
- in position 2 the view3 and view4 arrangement list
Thus, it is possible to use the Open function with the position parameter or the arrangements directly (see below)
In addition, you can add other arrangements or lists of arrangements later.
The Open method accepts as parameter an arrangement, a number which defines the position in the initialization list or a list comprising one of the two elements mentioned above.
In this example, the 0 position defined in the initialization list corresponds to the view1 arrangement.
The isOpen method works on the same principle: arrangement, position or list (arrangement or position).
It returns TRUE if all tested arrangements are open.
If only one is closed, it returns FALSE.
Finally, here is an example of use to move through the history using the BACK key. When the history contains no more elements, then the application is reduced.
6. Screen recording
7. Downloads
GITHUB
AIX
APK
Translated from French