Help Center/ Meeting/ Client SDK Reference/ Android SDK/ API Reference/ UI Customization/ Customizing the Icon for a Specific Scenario
Updated on 2024-12-27 GMT+08:00

Customizing the Icon for a Specific Scenario

This API is used to customize the icon for a specific scenario.

Precautions

None

Method Definition

HWMUiCustomImageInfo getImage(HWMUiCustomImageScene scene);

Parameter Description

Table 1 Enumerated values of HWMUiCustomImageScene

Enumerated Value

Description

CLOUD_RECORD_ICON_IMAGE_SCENE

Main cloud recording icon in a meeting (in the recording pop-up menu and participant list).

MAIN_WINDOW_CLOUD_RECORD_ICON_SCENE

Small cloud recording icon in the main window.

MAIN_WINDOW_CLOUD_RECORD_LOGO_SCENE

Large cloud recording logo in the main window.

Table 2 HWMUiCustomImageInfo parameter description

Parameter

Type

Description

image

int*

Custom icon resource index.

width

int

Icon width, in pixel.

height

int

Icon height, in pixel.

Sample Code
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);
    }
}