List of usage examples for android.widget PopupMenu getDragToOpenListener
public OnTouchListener getDragToOpenListener()
From source file:com.android.calculator3.Calculator2.java
private PopupMenu constructPopupMenu() { final PopupMenu popupMenu = new PopupMenu(this, mOverflowMenuButton); mOverflowMenuButton.setOnTouchListener(popupMenu.getDragToOpenListener()); final Menu menu = popupMenu.getMenu(); popupMenu.inflate(R.menu.menu);/*from w ww .j a v a 2 s. co m*/ popupMenu.setOnMenuItemClickListener(this); onPrepareOptionsMenu(menu); return popupMenu; }