答案 0 :(得分:0)
@TuNguyen不知道您是否还在寻找答案,但是对于仍然面临此问题的人们:我使用popupWindow的(WindowLayoutType
)解决了这个问题。添加此作品:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
popupWindow.windowLayoutType = WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG
//Refer to the android's doc I attached above for the complete list of WindowLayouts
}
//I am using Kotlin