CymChad / CymChad/BaseRecyclerViewAdapterHelper

3.0.14的bug

Open
#6,813 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
24.6k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

当你RecyclerView设置为GridLayoutManager,这是你通过选项卡获取新的数据后不断创建新的BaseQuickAdapter,重新给RecyclerView复制adapter,你会发现当一个选项卡获取到数据为空你也创建一个adapter复制给RecyclerView,这时候你切换选项卡获取新的数据你也创建一个adapter复制给RecyclerView,你会发现布局就会变形不对,问题出在manager.spanSizeLookup下的getItemViewType获取上,会残留旧的数据。你看一下啊。

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.

Research direction

Start with the manager.spanSizeLookup and its getItemViewType path described in the issue. Reproduce switching tabs while replacing the RecyclerView adapter, including a tab with empty data, and inspect whether old item-type data remains. Done means the GridLayoutManager layout stays correct after each tab switch.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.