RecyclerView adds items multiple times

ぐ巨炮叔叔 提交于 2019-11-29 17:53:11

The problem was in the onBindViewHolder method the focus was set, so when I remove the focus code it works.

@Override
public void onBindViewHolder(TodoViewHolder holder, int position) {
     holder.cbDone.setChecked(todos.get(position).isChecked());
     holder.tvDescription.setText(todos.get(position).getDescription());

     // Remove the following code
     // if(holder.tvDescription.requestFocus()) {
     //    window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
     // }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!