RecyclerView inside PopupWindow, how to dismiss after clicking item?

I have a recyclerview inside my PopupWindow, how do I dismiss the PopupWindow after clicking on an item inside my recycler? public SelectBucketMenu(Context context, ArrayList<String> mBucketNames, ArrayList<String> mImagesBucket) { super(context); this.mContext = context; this.mBucketNames = mBucketNames; this.mImagesBucket = mImagesBucket; setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); setOutsideTouchable(true); setFocusable(true); //Need set windowlayout for API 19 otherwise window won’t appear setWindowLayoutMode(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);…

Details