Commit f94544fd authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 4ee9c4d6
......@@ -12,20 +12,25 @@ class NewHotStyleAdapter : BaseQuickAdapter<VedioBean, BaseViewHolder>(R.layout.
R.id.tvVedioItemCount,
"${if (item.completeStatus == 0) "已完结" else "更新至${item.vedioTotal}"}"
)
holder.setText(
R.id.tvVedioItemTitle,
"${item.title}"
)
holder.setText(
R.id.tvVedioItemText,
"${item.vedioDesc}"
)
GlideUtils.loadImageViewGifForFitCenter(
context,
item.coverImage,
holder.getView(R.id.ivVedioItem)
)
if (item.title != null) {
holder.setText(
R.id.tvVedioItemTitle,
"${item.title}"
)
}
if (item.vedioDesc != null) {
holder.setText(
R.id.tvVedioItemText,
"${item.vedioDesc}"
)
}
if (item.coverImage != null) {
GlideUtils.loadImageViewGifForFitCenter(
context,
item.coverImage,
holder.getView(R.id.ivVedioItem)
)
}
}
}
\ No newline at end of file
......@@ -96,12 +96,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
} else {
srlMainPage.finishLoadMore()
}
try {
hotStyleAdapter.notifyItemChanged(data.list.size + 1)
} catch (e: Exception) {
e.printStackTrace()
hotStyleAdapter.notifyDataSetChanged()
}
hotStyleAdapter.notifyItemChanged(data.list.size + 1)
}
}
}
......
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