更新时间:2024-11-22 GMT+08:00
分享

自定义指定场景图标

该接口用于自定义指定场景图标。

注意事项

方法定义

HWMUiCustomImageInfo getImage(HWMUiCustomImageScene scene);

参数描述

表1 枚举HWMUiCustomImageScene说明

枚举值

描述

CLOUD_RECORD_ICON_IMAGE_SCENE

会中云录制主图标(云录制菜单弹窗、与会者列表)

MAIN_WINDOW_CLOUD_RECORD_ICON_SCENE

主窗口云录制Icon小图标

MAIN_WINDOW_CLOUD_RECORD_LOGO_SCENE

主窗口云录制Logo大图标

表2 HWMUiCustomImageInfo参数说明

参数

类型

描述

image

int*

自定义图标资源索引

width

int

图标显示宽度,PX单位

height

int

图标显示高度,PX单位

示例代码
public class CustomIUiCustomImageHandler implements IUiCustomImageHandler {
    @Override
    public HWMUiCustomImageInfo getImage(HWMUiCustomImageScene scene) {
        Map<HWMUiCustomImageScene, HWMUiCustomImageInfo> customImageMap = new HashMap<>();
        HWMUiCustomImageInfo cloudRecordIcon = new HWMUiCustomImageInfo();
        cloudRecordIcon.setImage(R.mipmap.hwmconf_ic_launcher)
                .setWidth(ViewGroup.LayoutParams.WRAP_CONTENT)
                .setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
        customImageMap.put(HWMUiCustomImageScene.CLOUD_RECORD_ICON_IMAGE_SCENE, cloudRecordIcon);
        HWMUiCustomImageInfo mainCloudRecord = new HWMUiCustomImageInfo();
        mainCloudRecord.setImage(R.mipmap.hwmconf_ic_launcher)
                .setWidth(ViewGroup.LayoutParams.WRAP_CONTENT)
                .setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
        customImageMap.put(HWMUiCustomImageScene.MAIN_WINDOW_CLOUD_RECORD_ICON_SCENE, mainCloudRecord);
        return customImageMap.get(scene);
    }
}

相关文档