Turns out making a toolbar button that responds to longpress is not as straighforward as you’d think. Just making a button, and listening for longpress event doesn’t work once the button is put in a toolbar. The trick turns out to be you need to put the button in a view. Here’s the example code:
The only drawback to using this method is you can’t use ‘systemButton’ styles.