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

initParams中的type应该做一下适配 #4

Open
LongAgoLong opened this issue Nov 5, 2018 · 1 comment
Open

initParams中的type应该做一下适配 #4

LongAgoLong opened this issue Nov 5, 2018 · 1 comment

Comments

@LongAgoLong
Copy link

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
windowParams.type = WindowManager.LayoutParams.TYPE_TOAST;
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
windowParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
}else{
windowParams.type = WindowManager.LayoutParams.TYPE_PHONE;
}

@LongAgoLong
Copy link
Author

还要申请悬浮窗权限

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

1 participant