Skip to content
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

调用show以后,再去更新弹窗,弹窗会先跑回上一个拖动的地方然后再移动到最新的地方 #187

Open
molast opened this issue Dec 2, 2024 · 5 comments
Labels
missing log Missing debug information wait Waiting for investigation

Comments

@molast
Copy link

molast commented Dec 2, 2024

调用show以后,再去更新弹窗,弹窗会先跑回上一个拖动的地方然后再移动到最新的地方,因为我的弹窗内容是列表,所以需要动态更新,弹窗可以拖动,但是只要一拖动,然后添加新的数据,或者去更新弹窗的view,就会出现弹窗先闪动到拖动的上一个位置,然后再闪到最新的位置

@molast
Copy link
Author

molast commented Dec 2, 2024

感觉这就是一个bug啊,因为我要刷新这个悬浮窗口,view的尺寸肯定会变化啊,现在的逻辑就是只要这个悬浮窗大小一旦发生变化,那么窗口就会闪上一次的位置,然后再调过来,这个效果很难受啊,难道作者在做这个时没这个问题吗,还是说一开始就只是一个大小的弹窗不会变化呢

@Petterpx
Copy link
Owner

Petterpx commented Dec 2, 2024

晚点看看

@Petterpx
Copy link
Owner

感觉这就是一个bug啊,因为我要刷新这个悬浮窗口,view的尺寸肯定会变化啊,现在的逻辑就是只要这个悬浮窗大小一旦发生变化,那么窗口就会闪上一次的位置,然后再调过来,这个效果很难受啊,难道作者在做这个时没这个问题吗,还是说一开始就只是一个大小的弹窗不会变化呢

能附上可复现的示例吗?或者你可以试试simple中的RecyclerView示例,目前没有发现此问题

@Petterpx Petterpx added wait Waiting for investigation missing log Missing debug information and removed Loading labels Dec 10, 2024
@mtjo
Copy link

mtjo commented Dec 13, 2024

这个问题我之前就有发现,可以通过固定 根view大小来解决,如果你的 根view 不是固定大小就会出现这个问题,veiw 大小变动会触发重新计算位置,你可以把 debug 模式打开看日志,就会发现有位置变更日志输出 @Petterpx @molast

@Petterpx
Copy link
Owner

这个问题我之前就有发现,可以通过固定 根view大小来解决,如果你的 根view 不是固定大小就会出现这个问题,veiw 大小变动会触发重新计算位置,你可以把 debug 模式打开看日志,就会发现有位置变更日志输出 @Petterpx @molast

理解意思了,这个没办法解决暂时,因为根view大小发生了变化,fx会自动调整当前位置,原理上是因为根view变化时,浮窗onSizeChanged会触发,此时内部会做一次兜底移动导致,但理解中这里的兜底是一个良好的效果。建议录屏看看,目前无法get具体效果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing log Missing debug information wait Waiting for investigation
Projects
None yet
Development

No branches or pull requests

3 participants