RecyclerView wrong position set onBindViewHolder

前端 未结 4 1410
误落风尘
误落风尘 2021-02-18 13:30

At First, my RecyclerView items are ok, but on scrolling, items are shown on the wrong position for example: item 6 shown in position 67. Although onClick listener and getAdapte

4条回答
  •  不要未来只要你来
    2021-02-18 13:49

    In your adapter class override this method and replace position to getItemViewType(position)

    @Override
    public int getItemViewType(int position) {
        return position;
    }
    

提交回复
热议问题