Any reason you can't just check for selected text in the PopupMenuListener? Once invoked, if there is selected text, show the menu. If not, don't show the menu.