CymChad / CymChad/BaseRecyclerViewAdapterHelper
java.lang.IllegalArgumentException: View is not a binding layout
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 异常代码:



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.
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