Commit 78ff32eb authored by jyx's avatar jyx

广告插入逻辑改变

parent d207dc32
......@@ -439,19 +439,22 @@ class DrawNativeVideoActivity : BaseActivity(),
}
override fun onRenderSuccess(p0: View?, p1: Float, p2: Float) {
val index = drawDatas.size / AD_INSERT_INDEX + mAdPage * AD_INSERT_INDEX
var index = drawDatas.size / AD_INSERT_INDEX + mAdPage * AD_INSERT_INDEX
if (index == 0) {
index++
}
drawDatas.add(index, DrawVideoBean(TYPE_AD_ITEM, ad, "", "", ""))
mAdPage++
// 列表只展示当前数据
mDrawVideoAdapter?.notifyItemInserted(mCurrentPlayIndex + 1)
}
})
ad.render()
}
// 列表只展示当前数据
mDrawVideoAdapter?.notifyItemInserted(mCurrentPlayIndex + 1)
}
override fun getXfPageMsgSuc(data: KylBean) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment