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.
Has anybody got a fix for this? Please share. https://code.google.com/p/android/issues/detail?id=231487