Arrows briefly left hanging on transition to a smaller menu
cmt218 opened this issue · comments
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!
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:
cascade.mp4
Relevant frames:
![]() |
![]() |
![]() |
![]() |
Here's another video captured at 5x (by slowing down animations in debugger settings):
cascade_5x.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 79ace48 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 667ffd2. Can you try out 1.3.0-SNAPSHOT
?
Confirmed fixed in 1.3.0
thanks for the help!