Skip to content

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

@jiaweio

Description

@jiaweio

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());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions