Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加适配了Android7.0 代码 #11

Open
jiaweio opened this issue Jun 11, 2018 · 1 comment
Open

添加适配了Android7.0 代码 #11

jiaweio opened this issue Jun 11, 2018 · 1 comment

Comments

@jiaweio
Copy link

jiaweio commented Jun 11, 2018

if (Build.VERSION.SDK_INT != 24) {
mPopupWindow.showAsDropDown(v);
} else {//Android 7.0 显示位置出现问题 兼容7.0
int[] location = new int[2];
v.getLocationOnScreen(location);
int x = location[0];
int y = location[1];
mPopupWindow.showAtLocation(v, Gravity.NO_GRAVITY, 0, y + v.getHeight());
}

@JayFang1993
Copy link
Owner

@DJwei 欢迎提Merge Request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants