PopupWindow $BadTokenException: Unable to add window — token null is not valid

后端 未结 11 2198

I have the following error when showing a PopupWindow. The errors are triggered by the line:

checkInPopup.showAtLocation((ViewGroup) mapView.getParent(), Gra         


        
11条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 05:29

    you are showing your popup too early. You may post a delayed runnable for showatlocation in Onresume , Give it a try

    Edit: This post seems to have the same problem answered Problems creating a Popup Window in Android Activity

提交回复
热议问题