Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

使用包装过的adapter时候,更新数据不能用原来的.必须是set给Recycle的那个

Open
#91 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java
Domain
mobile

Research direction

Start by reproducing the issue from the RecyclerViewActivity snippet, focusing on mRecyclerView.setAdapter, mAdapter.notifyItemRemoved, and mLoadMoreWrapper.notifyItemRemoved. Trace how the wrapped adapter handles these notifications; done means updates through the original adapter refresh the RecyclerView consistently, or the required usage is clearly documented.

Written by the indexing model from the issue text.

Description

mRecyclerView.setAdapter(mLoadMoreWrapper);
mAdapter.setOnItemClickListener(new CommonAdapter.OnItemClickListener()
{
@Override
public void onItemClick(View view, RecyclerView.ViewHolder holder, int position)
{
Toast.makeText(RecyclerViewActivity.this, "pos = " + position, Toast.LENGTH_SHORT).show();
mAdapter.notifyItemRemoved(position);//错误
mLoadMoreWrapper.notifyItemRemoved(position);//正确,所以使用包装的adpter的时候一定得注意这点不然数据不刷新
}

        @Override
        public boolean onItemLongClick(View view, RecyclerView.ViewHolder holder, int position)
        {
            return false;
        }
    });
}
Dominant language
Java
Stars
4.7k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hongyangAndroid/baseAdapter

All issues in hongyangAndroid/baseAdapter

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.