action-menu

How to fully mimic Action item view in the toolbar, for a customized one?

情到浓时终转凉″ 提交于 2019-12-07 13:44:42
问题 Background I have an action item that's not quite standard. It has its own layout, because I've failed to create a nice Drawable for it (written about it here). Basically, it's just a TextView with a background that wraps its short text that it shows. The problem Sadly I can't find a way of fully mimic it to look like normal ones: The ripple effect (and probably the simple clicking effect on older versions too) doesn't have the same color and size. There isn't a toast for when I long click on

How to fully mimic Action item view in the toolbar, for a customized one?

安稳与你 提交于 2019-12-05 21:01:53
Background I have an action item that's not quite standard. It has its own layout, because I've failed to create a nice Drawable for it (written about it here ). Basically, it's just a TextView with a background that wraps its short text that it shows. The problem Sadly I can't find a way of fully mimic it to look like normal ones: The ripple effect (and probably the simple clicking effect on older versions too) doesn't have the same color and size. There isn't a toast for when I long click on it Maybe other things I haven't noticed? Here are screenshots to demonstrate the differences: The new