(PopupWindow literally means a pop-up menu. Unlike Dialog, PopupWindow does not lose focus on the host activity component. That is, after PopupWindow pops up, you can interact with the host activity, but Dialog cannot. Note the use of the<imgsrc="tongue. gif" smilieid="7" border="0" alt=""/>opupWindow component. PopupWindow is a blocking dialog box. If you directly display it in the method created by Activity, an error will be reported: android.view WindowManager$BadTokenException:Unabletoaddwindow--tokennullisnotvalid; isyouractivityrunning? Summary<imgsrc="tongue. gif" smilieid="7" border="0" alt=""/>The opupWindow must be displayed in something or a new thread must be opened to call it. You cannot directly display a PopupWindow in the onCreate method, or the above errors will be permanent. This document includes the following annexes:)