class UrlVideoListAdapter(val context: FragmentActivity, private val dataList: List<UrlVideoData>) :
BaseAdapter() {
private val viewModel: BrowserViewModel =
ViewModelProvider(context)[BrowserViewModel::class.java]
private var roundOptions: RequestOptions? = null
init {
initObserver()
viewModel.updateResolutionVideoInfo( dataList)
}
private fun initObserver() {
viewModel.dataLiveData.observe(context) {
if (true == it) {
notifyDataSetChanged()
}
}
}
网友评论