RecyclerView+BaseRecyclerViewAdapterHelper is not fully displayed and only the first line of items is displayed. I am confused... I don’t want to say more, let’s just say it
First look at the method in the adapter code convert()
:
class MineRadioAdapter(layoutResId: Int = R.layout.item_my_live) :
BaseQuickAdapter<MutableList<MyLiveList>, BaseViewHolder>(layoutResId) , LoadMoreModule {
...
override fun convert(holder: BaseViewHolder, itemList: MutableList<MyLiveList>) {
...
holder.itemView.run {
tv_title.text = itemList[holder.adapterPosition].title.toString()
tv_source.text = itemList[holder.adapterPosition].source.toString()
...
}
After debugging, is the second parameter in the original method correct ? If it is, it will only be executed once in the method. To solve the problem: just change it toconvert()
list
item
list
convert()
list
item
Change this code to: