Эта страница является
переводом страницы
IRidium studio 2019 Lists. Перевод выполнен на 100%.
Scroll lists
Static List is a list to scroll popups that you created in a project
List is a simple list to fill in from the script
Advanced List is a more flexible and complicated list to fill in from the script
Picker is a drum to scroll values, for example, to select time or date
Types of scroll lists:
Static List List of popups
|
Static list is an item to navigate in the project that allows to place numerous popups on one page and move between them with the help of gestures. A static list looks like a graphic item on a page or a popup. The settings of a static list include a list of used popups anf their order. If a popup is in a static list, it can't be used independently or in another list (technical limit).
|
List Dynamically filled list
|
List is a scroll list that can be filled with numerous items, a popup is used as a template for these items. The contents of each item is filled from the script and can be changed in the process of project work. It's easy to work with a list via the script, but it does not support replacing items, adding items to the beginning or to the middle of the list (the whole contents must be updated).
|
Advanced List Improved list that is filled dynamically
|
Advanced list is also controlled via script. It works well with very many items and allows to add items to anu position of the list, but it take more time to learnt to work with it.
|
Picker Drum to scroll items
|
The drum allows to form a list of items on the basis of a template, change the number of items and information in them. A drum can be created only with the help of the script. It is not used to work with equipment directly. The main example of use is setting date and time.
|
Static List
It's s graphic item inside which popups can be scrolled. It is used to crate a menu, controlled with gestures.Commands to equipment are assigned to graphic items on popups, included in the list.
Static list allows to place numerous popups on one page and move between them with the help of gestures. A static list looks like a graphic item on a page or a popup. The settings of a static list include a list of used popups anf their order. If a popup is in a static list, it can't be used independently or in another list (technical limit).
Settings of Static List, except general:
- Popups List - список попапов, которые нужно показать в списке
- Direction: Vertical / Horizontal - вертикальная или горизонтальная прокрутка списка. Зациклить список нельзя
- Resistance (%) - скорость, с которой список будет терять инерцию движения и останавливаться после отпускания
- Scroll bar - показать или скрыть полосу прокрутки
- PullUp Tweener - тип анимации при листании списка
- PullUp Time - скорость листания списка
- Attach to - способ "прилипания" попапов к краям базового элемента списка: прилипание к центру, к верхнему краю, к нижнему краю, к обоим краям:
- Center - середины попапов прилипают к центральной линии списка (центровка). Не подходит, если попапы шире (выше) самого списка;
- Stick Up - левые (верхние) края попапов прилипают к левому (верхнему) краю списка. . Не подходит, если попапы шире (выше) самого списка;
- Stick Up & Down - края попапов прилипают к краям списка (по направлению прокрутки). Подходит для больших попапов, которые можно будет открывать "по частям";
- Columns - список заполняется колонками попапов. Вертикальный: слева-направо и сверху-вниз. Горизонтальный: сверху-вниз и слева-направо;
- No - без прилипания к краям при остановке.
- Indent (px) - отступ между попапами списка, недоступен для для "Attach to: Center"
List
List is a scroll list that can be filled with numerous items, a popup is used as a template for these items. The contents of each item is filled from the script and can be changed in the process of project work. It's easy to work with a list via the script, but it does not support replacing items, adding items to the beginning or to the middle of the list (the whole contents must be updated).
A list can be created from the script without adding a graphic item to the visualization interface. Only a template of a list item that will be cloned must be added to the interface. Remember that list items will do commands, assigned to the original template.
Manual on filling the list from JavaScript
Settings of List, except general:
- Select template is a popup template on the basis of which a list is built (by cloning and filling in with data)
- Direction: Vertical / Horizontal - scrolling a list vertically ot horizontally. A list can't be looped.
- Scroll bar - hide or show scroll bar
- Resistance (%) - speed with which a list will inertia and stop after release.
Advanced List
Advanaced list works well with many items and it can be filled with a data array from the variable. Data are an array of objects each of which describes 1 list item. A list can be built on the basis of several item-templates and be filled with different data. To update a list, an updated data array must be sent to it.
A command can be assigned to a popup that is selected as an item-template. This command will be repeated in all list items.
Information about a pressed item comes to the listener of the event IR.EVENT_LIST_ITEM_CHANGE
Settings of Advanced List, except general:
- Direction: Vertical / Horizontal - scrolling a list vertically or horizontally
- Scroll Bar - display the scrollbar of a list;
- Stop By Tap - stop moving a list when touching;
- Looped - loop a list;
- Template setting - popup-template that are used to make a list (by cloning). In every template you can set wich keys of JSON object each property of template items corresponds to;
- Data source - a variable where an array of objetcs to fill in the list (json object) must be written. See further the structure of data and ways to associate keys and item properties.
Example of data:
[
{
"__popup": "Folder",
"Name": "Composer 1"
},{
"__popup": "Composition",
"Song Name": "Song one",
"Album": "First",
"Length": "3:25"
},{
"__popup": "Composition",
"Song Name": "Song two",
"Album": "First",
"Length": "2:12"
},{
"__popup": "Folder",
"Name": "Composer 2"
},{
"__popup": "Composition",
"Song Name": "Song three",
"Album": "Second",
"Length": "1:25"
}
]
Template Setting – setting of popups: templates of item lists; connection of list items to keys of json object:
1 Select a template for a list item - a popup that will be cloned to create list items.
2 Create a list of properties where to write data from JSON object in the settings of each template. To the right of the property you can write a value, that is the name of the key in JSON object, a value from which will be written in the corresponding property. JSON object may contain different data for different list items.
3 Select in Data source a variable that will send an array of objects to fill in the list.
List that will be built as a result:
Существует также предыдущая версия API для заполнения списков полностью из скрипта, но она не рекомендована к использованию.
Picker
A drum allows to scroll a list of items, change the number of items and information in them. The main use is to set time and date. A drum can be created only with the help of script: see Picker API.
Creating a drum:
- create a new popup-template for a drum line
- form a set of data a drum must be built from (e.g.: a list of dates and months) with the help of Java Script.
UsePicker API, to create and fill in a list
- create the graphic appearance of a drum
Manual on filling in Picker from JavaScript