更新时间:2023-03-23 GMT+08:00
自定义与会者列表页面中的菜单
该接口用于自定义与会者列表页面中的菜单,包括下面三种菜单:
1.buildParticipantMoreMenuItems:自定义标题栏右侧菜单项
图1中区域1位置的菜单
2.buildParticipantItemMenuItems:自定义与会者列表项点击弹出的菜单
3.buildParticipantToolbarMenuItems:自定义与会者页面底部菜单栏
图1中区域3位置的菜单
4.buildParticipantToolbarMoreMenuItems:自定义点击底部更多菜单项弹出的菜单
使用场景
需要自定义与会者页面四个区域菜单项的场景
注意事项
1.SDK初始化的时候必须传入这个配置sdkConfig才会生效
自定义与会者列表点击菜单设置
示例代码
1
|
sdkConfig.setParticipantMenuStrategy(new CustomParticipantMenuHandle()); |
示例代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
public class CustomParticipantMenuHandle implements IParticipentMenuStrategy { @Override public List<IConfMenu> buildParticipantMoreMenuItems() { List<IConfMenu> confMenus = new ArrayList<>(); confMenus.add(new ParticipantShareMenu()); confMenus.add(new ContantMenu()); //【演示】增加一个自定义菜单 confMenus.add(new CustomMoreMenu()); return confMenus; } @Override public List<IConfMenu> buildParticipantItemMenuItems() { List<IConfMenu> confMenus = new ArrayList<>(); confMenus.add(new ReleaseOrRequestChairManMenu());//申请/释放主持人 confMenus.add(new MuteOrUnmuteMenu());//静音 confMenus.add(new BroastAndCacelMenu());//广播 confMenus.add(new SetChairmanMenu());//设为主席 confMenus.add(new RecallMenu());//重新呼叫 if (LoginConstant.AppEdition.China.getEdition().equals(PreferenceUtils.read(PreferenceUtils.PREFERENCES_NAME, APP_EDITION, LoginConstant.AppEdition.China.getEdition(), Utils.getApp()))) { confMenus.add(new CallOtherNumberMenu());//呼叫其他号码 } confMenus.add(new SelectWatchOrCacnelMenu());//选看 confMenus.add(new RenameMenu());//重命名 confMenus.add(new HandsUpOrDownMenu());//举手 confMenus.add(new AttendeeProfileMenu());//查看与会者详情 confMenus.add(new HangupMenu());//挂断 confMenus.add(new RemoveMenu());//移除 //【演示】增加一个自定义菜单 confMenus.add(new CustomMoreMenu()); return confMenus; } @Override public List<IConfMenu> buildParticipantToolbarMenuItems() { return null; } @Override public List<IConfMenu> buildParticipantToolbarMoreMenuItems() { List<IConfMenu> confMenus = new ArrayList<>(); confMenus.add(new AllowUnmuteOrNotMenu()); confMenus.add(new ReleaseOrRequestChairManMenu()); confMenus.add(new LockOrUnlockConfMenu()); //【演示】增加一个自定义菜单 confMenus.add(new CustomMoreMenu()); return confMenus; } } |
父主题: 界面定制