V3 Setting and Query Sorting of Main UI Controls
Function: setSetMainUiSort
Flutter Example:
/// v3 Set event number for sorting of main UI controls
setMainUISortV3(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.func_v3_main_ui_sort),
/// v3 Set sorting of main UI controls
libManager.send(evt: CmdEvtType.setMainUISortV3, json: jsonEncode(json));
JSON Fields Sent by App:
| Field Name | Field Type | Field Description |
|---|---|---|
| version | int | Protocol library version number |
| operate | int | Operation 0: Invalid 1: Query 2: Set |
| all_num | int | Number of details of control sorting list |
| items | int [] | List of control sorting details |
| location_x | int | Coordinate x-axis, starting from 1 |
| location_y | int | Coordinate y-axis, starting from 1 One y-axis represents a horizontal grid |
| size_type | int | 0: Invalid 1: Large icon 2: Small icon |
| widgets_type | int | Types of controls 0: Invalid 1: Week/Date 2: Steps 3: Distance 4: Calories 5: Heart Rate 6: Battery |
Example:
{
"version": 0,
"operate": 2,
"all_num": 3,
"items": [
1,
2,
3
],
"location_x": 1,
"location_y": 1,
"size_type": 2,
"widgets_type": 1
}
JSON Fields Received by App:
| Field Name | Field Type | Field Description |
|---|---|---|
| version | int | Protocol library version number |
| err_code | int | 0: Success, Non-zero: Failure |
| operate | int | Operation 0: Invalid 1: Query 2: Set |
| all_num | int | Number of currently displayed list in firmware |
| items | array | Arrangement of currently displayed list in firmware Collection of location_x,location_y,size_type, support_size_type,and widgets_type |
| support_items | array | All supported component types in firmware Collection of support_size_type and widgets_type |
| Field Name | Field Type | Field Description |
|---|---|---|
| location_x | int | Coordinate x-axis, starting from 1 |
| location_y | int | Coordinate y-axis, starting from 1 One y-axis represents a horizontal grid |
| size_type | int | 0: Invalid 1: Large icon 2: Small icon |
| support_size_type | int | Editable icon types supported by the firmware 0: Invalid 1: Large icon 2: Small icon 3: Large icon + Small icon |
| widgets_type | int | Types of controls 0: Invalid 1: Week/Date 2: Steps 3: Distance 4: Calories 5: Heart Rate 6: Battery |
| Field Name | Field Type | Field Description |
|---|---|---|
| support_size_type | int | Editable icon types supported by the firmware 0: Invalid 1: Large icon 2: Small icon 3: Large icon + Small icon |
| widgets_type | int | Types of controls 0: Invalid 1: Week/Date 2: Steps 3: Distance 4: Calories 5: Heart Rate 6: Battery |
Example:
{
"version": 0,
"err_code": 0,
"operate": 0,
"all_num": 0,
"items": [],
"location_x": 0,
"location_y": 0,
"size_type": 0,
"widgets_type": 0
}