更新时间:2025-05-29 GMT+08:00

设置与会者头像风格

setParticipantAvatarStyle:

接口描述

该接口用于设置与会者头像风格。

注意事项

  1. 该接口非必需调用,若不设置,则使用默认的头像。

方法定义

- void setParticipantAvatarStyle(HWMAvatarStyle avatarStyle);

参数描述

表1 HWMAvatarStyle参数说明

参数

是否必须

类型

描述

backgroundColor

int

背景色。

textColor

int

文字颜色。

nameShowType

NameShowType

姓名显示风格。

avatarShape

AvatarShape

头像形状。

phoneIcon

Bitmap

pstn用户头像图片。

boardIcon

Bitmap

大屏头像图片。

表2 NameShowType枚举说明

枚举值

描述

FIRST_LETTER

显示拼音首字母(如果是英文名则显示首字母)。

FAMILY_NAME

显示姓氏(如果是英文名则显示首字母)。

表3 AvatarShape枚举说明

枚举值

描述

CIRCLE

圆形头像。

返回值

接口是否调用成功。

示例代码

HWMAvatarStyle style = new HWMAvatarStyle(backgroundColor, textColor, HWMAvatarStyle.NameShowType.FAMILY_NAME, HWMAvatarStyle.AvatarShape.CIRCLE);
HWMBizSdk.getBizOpenApi().setParticipantAvatarStyle(style);