[FREE] AirdArrangementManagement - extension

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

whenOpen
WhenPrevious

Add
ClearHistory
CloseAll
CountHistory
Initialise
IsOpen
Open
Previous

4. Documentation
4.1 Events

whenOpen
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.

WhenPrevious
Triggered when the method Previous is started

4.2 Methods
Add
To add another arrangement to the initialization list. You can also add an arrangement list. See example below.

ClearHistory
Empty history

CloseAll
Close all arrangement initialized in the initialization list.

CountHistory
Return the number of “pages” in the history.

Initialise
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.

IsOpen
Return true or false.
You can test a arrangement, a list of arrangement, or even a position in the Initialization List.

Open
Open a arrangement, a list of arrangements, a group of arrangement according to its position in the Initialization List.

Previous
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.

ex_add_arrangement ex_add_list

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.

ex_open_arrangement
ex_open_position
ex_open_list
ex_open_listMix

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.
ex_isopen_arrangement ex_isopen_listMix ex_isopen_position

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.
ex_use_backPress

6. Screen recording

7. Downloads
GITHUB
AIX
APK

Translated from French

8 Likes

Hi @airD,
great extension :+1: but you need to show us a screen recording so we now what it does exactly :wink:
BTW, welcome to the community !

Hi,
Ok i’ll do it!!

1 Like

thank you for your contribution
what exactly is a view? is it the same as an arrangement?

Taifun

1 Like

Hi @Taifun,
Yes, view = arrangement!
Do you think I should modify?

probably yes, this helps to understand much better, what the extension is doing…
just replace view by arrangement everywhere…
also you might want to rename the extenson itself from AirDViewsManagement to just AirDArrangement or AirDArrangementManagement

what kind of input does the Initialise method expect for parameter listView? A list which contains arrangements?
for the Add, Open and IsOpen methods you are using views as parameter? Is it the same as listView?
an example screenshot of how to use the blocks might be helpful…

Taifun

2 Likes

Hello,
Thank you for your help.
I change the name and add examples of use!
I will finish modifying the block images soon

2 Likes