我有一个类 activity_player
布局,其中我有 exoplayer2.ui.PlayerView
并且我创建了 exo_player_control_view
以便它覆盖默认控件外部播放器。所以我想在新创建的自定义控件 View 中使用数据绑定(bind),但不知道该怎么做。有什么建议吗?
这实际上是关于 here 的未解决问题,但尚未解决。那么有没有人有使 exo_player_control_view
数据绑定(bind)友好的解决方法?
最佳答案
像这样使用>>>>
private val binding by lazy {
ActivityPipVideoPlayerBinding.inflate(layoutInflater)}
private val exoPLayerBinding by lazy {
VdoExoControlViewBinding.inflate(LayoutInflater.from(this), binding.root, true)
}
关于android - 如何使用Databinding实现ExoPlayer?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54739354/