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

需求:靠左吸附的时候隐藏左边阴影,移动时展示全阴影,靠右吸附的时候隐藏右边隐藏。 #180

Open
zhangjianzhu opened this issue Apr 23, 2023 · 3 comments

Comments

@zhangjianzhu
Copy link

zhangjianzhu commented Apr 23, 2023

如果我一直隐藏左右两边的阴影,吸附就没什么问题,现在就是按上述说的话,前两条都没问题,只有靠右吸附的时候有间距,但是点一下间距又消失了,debug看rightPadding也为0,有点搞不懂,望指教

@zhangjianzhu
Copy link
Author

c1de6b6d3ff0e83cd1f9e58dc0b0475c.mov

@zhangjianzhu
Copy link
Author

image

image

@lihangleo2
Copy link
Owner

嗯 因为阴影是占据布局位置的,这也是ShadowLayout最大的缺点之一,我也一直在寻找解决这个缺点的办法,你可以尝试重新设置ShadowLayout大小,重新触发onMeasure和onSizeChange。可以先尝试下,有时间我会重构下这部分的功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants