RecyclerView+BaseRecyclerViewAdapterHelper display incomplete display only the first line of item to solve the problem

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()listitemlistconvert()listitem

Change this code to:

insert image description here

Guess you like

Origin blog.csdn.net/qq_35091074/article/details/130005442