Android Nougat 7.1.1 showAtLocation(…) Gravity not working
问题 This is related to this question: Android Nougat PopupWindow showAsDropDown(...) Gravity not working However, when I applied this fix: if (android.os.Build.VERSION.SDK_INT >=24) { int[] a = new int[2]; anchorView.getLocationInWindow(a); popUp.showAtLocation(((Activity) mContext).getWindow().getDecorView(), Gravity.NO_GRAVITY, 0 , a[1]+anchorView.getHeight()); } else{ popUp.showAsDropDown(anchorView); } It doesn't work on Android Nougat 7.1.1. Particularly on Google Pixel and Nexus 6p devices.