Skip to content

Instantly share code, notes, and snippets.

@mightyfrog
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mightyfrog/9d10c681092efa8c54d5 to your computer and use it in GitHub Desktop.
Save mightyfrog/9d10c681092efa8c54d5 to your computer and use it in GitHub Desktop.
How to use PopupMenuCompat
ImageView menuBtn; // vertical three dots

final PopupMenu popup = new PopupMenu(context, menuBtn);
popup.getMenuInflater().inflate(R.menu.test, popup.getMenu());
menuBtn.setOnTouchListener(PopupMenuCompat.getDragToOpenListener(popup));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment