使用包装过的adapter时候,更新数据不能用原来的.必须是set给Recycle的那个
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 32/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hongyangAndroid/baseAdapter
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
hongyangAndroid/baseAdapter#122 ·
-
含泪放弃维护了 Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
hongyangAndroid/baseAdapter#136 ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
hongyangAndroid/baseAdapter#134 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
hongyangAndroid/baseAdapter#133 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
hongyangAndroid/baseAdapter#131 · 2 comments · 1 reaction ·
All issues in hongyangAndroid/baseAdapter
Similar issues
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Openarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100