Closed cmt218 closed 3 years ago
Interesting. I'm trying to watch a slowed down version of that video and I don't see the arrow left hanging. Is it possible that the low quality of the GIF is giving such an impression? Here's a high quality version of the GIF:
https://user-images.githubusercontent.com/2387680/106095502-e7fe5b00-6101-11eb-85ca-86c5136a6897.mp4
Relevant frames:
Here's another video captured at 5x (by slowing down animations in debugger settings):
https://user-images.githubusercontent.com/2387680/106095561-fe0c1b80-6101-11eb-9d35-c9aa2de738f2.mp4
I'm watching a video of your app sent by @burntcookie90 and I think I know what's happening for your popup -- AppCompat's default background drawable for popups has internal paddings. They cause a gap to be present between your popup's last item and the popup's bottom edge. I'm fairly sure it's also causing the arrow to be visible for a frame when the submenu has fully entered in.
Can you try setting a custom background to your popup without internal paddings?
val cascadeStyler = CascadePopupMenu.Styler(
background = {
PaintDrawable(popupColor).also { it.setCornerRadius(8f.dip) }
}
)
val cascade = CascadePopupMenu(context, anchorView, styler = cascadeStyler)
I wrongly assumed that https://github.com/saket/cascade/commit/79ace480f33bc7cd2726db5022c099deeb54d9c4 would be sufficient in working around this issue, but looks like I need to also add a default background for cascade popups that doesn't have internal paddings.
Update: This should be fixed by https://github.com/saket/cascade/commit/667ffd242a5992cd1b9187818a11cbd64bba1aab. Can you try out 1.3.0-SNAPSHOT
?
Confirmed fixed in 1.3.0
thanks for the help!
Hi! Just a small UI issue my teammate @burntcookie90 and I were discussing is that during menu transitions sometimes the arrow icon is briefly left hanging. I didn't notice it at all for a while, but then one of our team members pointed it out and now its hard to unsee!
We noticed it in a POC we were doing, but it can actually be seen slightly in the demo gif:
Relevant frames (sorry for uneven height):
Seems to happen when navigating to a shorter menu and the arrows are below the incoming menu items.
Thanks for the great library!