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

自定义指定场景文案

该接口用于自定义指定场景文案。

注意事项

方法定义

String getString(HWMUiCustomTextScene scene);

参数描述

表1 枚举HWMUiCustomTextScene说明

枚举值

描述

CLOUD_RECORD_FINISHED_ALERT_TEXT_SCENE

会议云录制结束弹窗提示文案

CLOUD_RECORD_FINISHED_ALERT_TEXT_IN_MEETING_SCENE

会中会议云录制结束弹窗提示文案

LEAVE_OR_END_CONF_POPUP_WINDOW_TEXT_SCENE

离开或结束会议弹框标题文案

CLOUD_RECORD_MENU_TITLE_TEXT_SCENE

录制弹窗菜单中的云录制标题

MAIN_WINDOW_CLOUD_RECORD_DES_TEXT_SCENE

主窗口中的云录制描述

示例代码
public class CustomIUiCustomTextHandler implements IUiCustomTextHandler {
    @Override
    public String getString(HWMUiCustomTextScene scene) {
        Map<HWMUiCustomTextScene, String> customTextMap = new HashMap<>();
        customTextMap.put(HWMUiCustomTextScene.CLOUD_RECORD_FINISHED_ALERT_TEXT_SCENE,
                DemoUtil.getResContext().getString(R.string.conf_cloud_record_finished_alert_text));
        customTextMap.put(HWMUiCustomTextScene.CLOUD_RECORD_FINISHED_ALERT_TEXT_IN_MEETING_SCENE,
                DemoUtil.getResContext().getString(R.string.conf_cloud_record_finished_alert_text_in_meeting));
        customTextMap.put(HWMUiCustomTextScene.LEAVE_OR_END_CONF_POPUP_WINDOW_TEXT_SCENE,
                DemoUtil.getResContext().getString(R.string.leave_or_end_conf_popup_window_text_scene));
        customTextMap.put(HWMUiCustomTextScene.CLOUD_RECORD_MENU_TITLE_TEXT_SCENE,
                DemoUtil.getResContext().getString(R.string.cloud_record_menu_title_text_scene));
        customTextMap.put(HWMUiCustomTextScene.MAIN_WINDOW_CLOUD_RECORD_DES_TEXT_SCENE,
                DemoUtil.getResContext().getString(R.string.main_window_cloud_record_des_text_scene));
        String value = customTextMap.get(scene);
        return value != null ? value : "";
    }
}

相关文档