Comments (7)
感谢反馈,但看起来你使用的这个下拉刷新组件并非谷歌官方提供的,因此我们无法了解它做了什么错误的事情,你能否提供最小可复现程序工程,或者根据你的 debug 发起 PR?
…
________________________________ From: grayson [email protected] Sent: Tuesday, March 9, 2021 8:37:56 PM To: drakeet/MultiType [email protected] Cc: Subscribed [email protected] Subject: [drakeet/MultiType] 嵌套使用,ItemViewDelegate对象出现多次重复加载,一直死循环。 (#316) SmartRefreshView + Multitype使用没有问题,数据可以正常加载。 ViewPager2 + Multitype使用没有问题,数据可以正常加载。 ViewPager2 + SmartRefreshView + Multitype使用就会出现重复加载的问题,严重时会出现死循环不停加载。 SmartRefreshView + Multitype 使用 [image]https://user-images.githubusercontent.com/19201565/110471316-f5eac700-8116-11eb-81ca-6821d7e638e2.png [image]https://user-images.githubusercontent.com/19201565/110471404-0e5ae180-8117-11eb-808f-c6522ff60f22.png ViewPager2 + SmartRefreshView + Multitype使用 [image]https://user-images.githubusercontent.com/19201565/110471503-2af71980-8117-11eb-8563-5ae2978e0e54.png [image]https://user-images.githubusercontent.com/19201565/110471541-35b1ae80-8117-11eb-9d5e-944279d7a358.png ― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#316>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHZABTDX3N6BMGQBG2HSKLTCYJCJANCNFSM4Y3QKHHA.
最小可复现程序工程已上传到Github。
链接地址:https://github.com/YunChe-Linghit/MultitypeFix
麻烦看看到底出什么问题了。
from multitype.
from multitype.
排查出问题了吗?是因为什么问题导致的呢?
from multitype.
@YunChe-Linghit 这个 issue 优先级不是很高,它大概率是你使用的另外的库的问题,因为 MultiType 理论上来说是很纯粹的,所以目前不会很紧急地进行处理,请再等等或尝试自行寻找原因和发起 PR。
from multitype.
from multitype.
刚刚我没测试完全,除了标识,高度也必须和之前一样;两次嵌套的情况下第一次拿到的事最外层的高度,导致我刚刚的方法不可用,我就删掉了,我改成了下面这样应该可以解决,但是需要再优化:
private var saveHeight = 0
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
if (saveHeight > 0) {
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(
saveHeight,
MeasureSpec.EXACTLY
))
return
}
val heightMode = MeasureSpec.getMode(heightMeasureSpec)
if (heightMode == MeasureSpec.EXACTLY) {
saveHeight = MeasureSpec.getSize(heightMeasureSpec)
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
}
from multitype.
onMeasure
确实是不停的onMeasure导致的,我最近又发现了,版本是4.2.0版本,只是在ConstraintLayout布局中添加,并且有用到ViewPager2。
from multitype.
Related Issues (20)
- ViewDelegate#getAdapterPosition NPE
- 在 ConcatAdapter 中,itemViewType获取错误导致的崩溃 HOT 6
- 在用MultiType来实现一个app的二级评论,如何处理点击事件呢? HOT 1
- Types接口是否支持oneToMany注册Type?
- 使用OneToMany问题 HOT 1
- 我该如何在 ItemViewDelegate 中操作 items ? HOT 2
- 大家好,我使用MultiTypeAdapter的时候itme复用是数据混乱了,请问有人遇到吗? HOT 2
- release模式下,混淆失败 HOT 2
- Rename & set typealias
- 多个布局作为一个itemview会显示不全 HOT 1
- 恕我直言,多类型实体类实现过于复杂!虽然item多样式,但后台返回外层json类型是一个,不可能根据你item的不同拆分bean的不同,不如MultiAdapter库。 HOT 2
- 怎么添加头尾布局?
- java.lang.VerifyError: Rejecting class that attempts to sub-type erroneous class com.drakeet.multitype.ItemViewBinder
- 请问 Demo中 BilibiliActivity 中嵌套的横向 PostAdapter 可以是 MultiTypeAdapter 吗?
- 在kotlin ItemViewBinder中, 在binder内部实现自我删除。items为List,不是mutableList。不能删除数据。items的类型 是否改为MutableList或者ArrayList<>
- 啥时候出一版支持Jetpack Compose呀?!
- 请问MultiType与AsyncListDiffer如何结合使用
- 我正在开发OpenHarmony应用,使用JS语言,你们能否支持JS版本?我愿意参与开发,期待回复。 HOT 2
- link 自定义问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multitype.