-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于复用后导致错乱的问题 #3166
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
竖向RecyclerView列表中,采用的多布局,其中有一种布局是横向滑动的RecyclerView,当这个横向滑动的RecyclerView滑动到最后一个item的时候,点击item中的关注按钮,点击后变为"已关注",现在我外层这个RecyclerView往下滑,然后再滑动回来这个横向的RecyclerView,这时候横向的这个RecyclerView全部都变为"未关注"了.这个横向的RecyclerView我已经设置了点击的标记.下面是横向RecyclerView的点击和adapter代码:
1.adapter代码:
`public class FocusHorizontalListAdapter extends BaseQuickAdapter<FocusBean.DataBean.ListBean, BaseViewHolder> {
}
2.该RecyclerView的item点击:
RecyclerView recyclerView = helper.getView(R.id.rv_home_focus_horizontal_list);List<FocusBean.DataBean.ListBean> data = new ArrayList<>();
for (int i = 0; i < 5; i++) {
FocusBean.DataBean.ListBean bean = new FocusBean.DataBean.ListBean();
data.add(bean);
}
LinearLayoutManager manager = new LinearLayoutManager(getContext());
manager.setOrientation(LinearLayoutManager.HORIZONTAL);
recyclerView.setLayoutManager(manager);
FocusHorizontalListAdapter adapter = new FocusHorizontalListAdapter(R.layout.multiple_item_focus_horizontal, data);
recyclerView.setAdapter(adapter);
The text was updated successfully, but these errors were encountered: