PSDK自定义控件问题咨询
已完成我目前尝试在原有的demo上面修改自定义控件,目前我想在主界面使用两个switch、一个list、两个button,配置界面不需要使用控件,我按照下面这样修改:
{
"version": {
"major": 1,
"minor": 0
},
"main_interface": {
"floating_window": {
"is_enable": false
},
"speaker": {
"is_enable_tts": false,
"is_enable_voice": false
},
"widget_list": [
{
"widget_index": 0,
"widget_type": "button",
"widget_name": "按钮",
"icon_file_set": {
"icon_file_name_selected": "icon_button1.png",
"icon_file_name_unselected": "icon_button1.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 0
}
},
{
"widget_index": 1,
"widget_type": "button",
"widget_name": "按钮2",
"icon_file_set": {
"icon_file_name_selected": "icon_button1.png",
"icon_file_name_unselected": "icon_button1.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 1
}
},
{
"widget_index": 2,
"widget_type": "list",
"widget_name": "列表",
"list_item": [
{
"item_name": "Item0",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item1.png",
"icon_file_name_unselected": "icon_list_item1.png"
}
},
{
"item_name": "Item1",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item2.png",
"icon_file_name_unselected": "icon_list_item2.png"
}
},
{
"item_name": "Item2",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item1.png",
"icon_file_name_unselected": "icon_list_item1.png"
}
},
{
"item_name": "Item3",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item2.png",
"icon_file_name_unselected": "icon_list_item2.png"
}
}
],
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 2
}
},
{
"widget_index": 3,
"widget_type": "switch",
"widget_name": "开关",
"icon_file_set": {
"icon_file_name_selected": "icon_switch_select.png",
"icon_file_name_unselected": "icon_switch_unselect.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 3
}
},
{
"widget_index": 4,
"widget_type": "switch",
"widget_name": "开关2",
"icon_file_set": {
"icon_file_name_selected": "icon_switch_select.png",
"icon_file_name_unselected": "icon_switch_unselect.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 4
}
}
]
}
}
英文的json文件也是这样的,除了中英文之外,格式设置都是保持一致的。
上面那样设置之后,我发现总是有一个button、一个switch注册不成功,我想咨询下,是不是不能在主界面同时使用两个同类型的控件呢。
如果有除了文档里面写了的之外的特殊要求的话,请介绍一下。
请先登录再写评论。
评论
4 条评论