直播广场入口 Android 接入方法

示意图

接入方式

val liveService = TTLiveService.getLiveService()
if (liveService != null) {
    //entryView对象是直播广场入口
    val entryView = liveService.createLiveEntranceView(baseContext)
}

获取到直播广场入口的 View 之后通过 addView 的方式添加到自己的布局当中,icon 最好使用自己定制的,只使用直播 View 的点击事件

参数说明

Context context:传入宿主容器的 Context,一般宿主页面的 Activity

诚邀您对本文档易读易用性进行评价
好用
不好用