public void showPopup(int group,int img_index,JSONArray json_ar,View v){
PopupMenu pm=new PopupMenu(EditPhotosActivity.this,v);
pm.getMenuIn
Although I was using AppCompat Theme, but I still had the same problem
I found out that problem is in the declaration of the PopupMenu, and the context I am passing to it.
I was using it like that:
PopupMenu popup = new PopupMenu(getApplicationContext(),v)
But it should be like this:
PopupMenu popup = new PopupMenu(MyActivity.this,v)