Skip to content

Commit

Permalink
bugFix:在 Android O 以下悬浮窗会像 Toast 一样自己消失
Browse files Browse the repository at this point in the history
  • Loading branch information
gtf35 committed Apr 29, 2020
1 parent 8781199 commit 840abff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void initView(final Context context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
} else {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_TOAST;
mLayoutParams.type = WindowManager.LayoutParams.TYPE_PHONE;
}

mLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
Expand Down

0 comments on commit 840abff

Please sign in to comment.