CymChad / CymChad/BaseRecyclerViewAdapterHelper

java.lang.IllegalArgumentException: View is not a binding layout

Open
#3,642 3 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

版本:3.0.6
问题:使用databinding,BaseQuickAdapter,在fragment添加头部,log出现异常,应用没闪退。
调用方法:
1、val bindingTest : View = layoutInflater.inflate(
R.layout.item_header_test,
null,
false
)
2、val bindingTest = DataBindingUtil.inflate(
layoutInflater,
R.layout.item_header_test,,
null,
false
)
mAdapter.addHeaderView(bindingTest .root)

log 异常代码:
image
image
image

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

Reproduce the report with the two DataBindingUtil.inflate variants and the BaseQuickAdapter.addHeaderView call shown in the issue. Start by tracing how the adapter handles the supplied header View and compare the binding and non-binding cases; done means the header can be added without the “View is not a binding layout” exception.

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.