Set widget ordering

Function table

__IDO_FUNCTABLE__.funcTable37Model.setMainUiSort

Widget Sorting Model Description

  • IDOMainInterfaceItemModel
Parameter Description Remark
locationX Horizontal axisx Start from 1
locationY Vertical axis y Start from 1
sizeType Size type 0 Invalid;1:
Large icons (one takes up a large horizontal grid);
2:Small icon(2 occupy a horizontal grid)
supportSizeType Firmware supports editable icon types 0 Invalid;
1:Large icon;
2:Small icon;
3:Large icon + small icon
widgetsType Widget type 0:Invalid 1:Activity tricycle (small icon)2:Steps 3:Last activity
4:Music 5:Weather 6:Heart rate 7:Stress 8:Sleep
9:Alexa 10:Temperature 11:Blood oxygen 12:Timer
13:Alarm 14:Reminder(Current schedule reminder)
15:Noise 16:Battery 17:Phone (Contact)18:World time
  • IDOMainInterfaceSupportItemModel
Parameter Description Remark
supportSizeType Firmware supports editable icon types 0 : Invalid;
1:Large icon;
2:Small icon;
3:Large icon + small icon
widgetsType Widget type 0:Invalid 1:Activity three rings (small icon)2:Steps 3:Last activity
4:Music 5:Weather 6:Heart rate 7:Stress 8:Sleep
9:Alexa 10:Temperature 11:Blood oxygen 12:Timer
13:Alarm 14:Event reminder (current schedule reminder)
15:Noise 16:Battery 17:Phone(contact)18:World time
  • IDOMainInterfaceSortModel
Parameter Description Remark
mainUiVersion Version No assignment needed for now
operate Operation 0:Invalid; 1Inquire; 2Set up
(No assignment required)
allNum Current number of firmware component types int
allSupportNum The number of types of all widgets supported by the firmware int
items Main interface collection array (IDOMainInterfaceItemModel)
supportItems Firmware support editable icon collection array (IDOMainInterfaceSupportItemModel)

Command code

Objc:

IDOMainInterfaceSortModel * model = [IDOMainInterfaceSortModel currentModel];
[IDOFoundationCommand setMainUiSortCommand:model
                                  callback:^(int errorCode) {
    if (errorCode == 0) {
       //Set successfully
    }else if (errorCode == 6) {
      //Device not supported
    }else {
      //Setup failed
    }
}];

Swift:

let model = IDOMainInterfaceSortModel.current();
IDOFoundationCommand.setMainUiSort(model) { (errorCode) in
     if errorCode == 0 {
        //Set successfully
     }else if errorCode == 6{
        //Device does not support this method
     }else {
       //Wrong setting
     }
};
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2023-12-18 10:04:13

results matching ""

    No results matching ""