Code example for ListPopupWindow

Methods: setOnDismissListener, show

0
        final PhotoActionListener listener = getListener();
        if (listener != null) {
            if (getWritableEntityIndex() != -1) { 
                mPopup = PhotoActionPopup.createPopupMenu(
                        mContext, mPhotoView, listener, mPhotoMode);
                mPopup.setOnDismissListener(new OnDismissListener() {
                    @Override 
                    public void onDismiss() { 
                        listener.onPhotoSelectionDismissed();
                    } 
                }); 
                mPopup.show();
            } 
        } 
    } 
 
    /** 
     * Attempts to handle the given activity result.  Returns whether this handler was able to 
     * process the result successfully. 
     * @param requestCode The request code. 
     * @param resultCode The result code.