【github 源码共享】【快递转运源码】【php对象源码】dialgo源码
1.Dialogä¸PopWindowçåºå«
Dialogä¸PopWindowçåºå«
ä»dialogçæºç å¯ä»¥çåºï¼ä¸ä¸ªdialogçå建就æ¯ä¸ä¸ªwindowçå建ï¼èActivityä¹æ¯ä¸ä¸ªwindowï¼æ以å¨onCreateä¸è°ç¨dialogçshowæ¹æ³å¯ä»¥å¼¹åºï¼å 为两个windowæ¯ç¸äºç¬ç«çï¼dialogçå¼¹åºä¸ä¼è§¦åActivityççå½å¨æï¼
并ä¸æºç ä¸å¯ä»¥çåºï¼dialogé»è®¤æ¯ç¹å»ç©ºç½åæ¶çï¼å¹¶ä½äºå± ä¸ä½ç½®ã
æºç ï¼
ä»æºç æ¥çPopWindowçDecorViewæ¯PopupDecorViewï¼PopupDecorViewæ¯ç»§æ¿
FrameLayout,源码github 源码共享æ以æ¬è´¨ä¸PopupWindowå°±æ¯ä¸ä¸ªViewï¼éè¦ä¾éä¸ä¸ªå ·ä½çviewï¼
é»è®¤æ åµä¸æ¯ä¸è½å¤å¨onCreateæ¶æ¾ç¤ºï¼æ以å¦ææ³è¦å¨çé¢æ¾ç¤ºçæ¶å就弹åºPopupWindow
éè¦éåonWindowFocusChangedæ¹æ³ï¼å¤æactivityå®å ¨æ¾ç¤ºï¼å¹¶ä¸å·²ç»æ¿å°ç¦ç¹ï¼æ¤æ¶
æè½è¿è¡æ¾ç¤º;
å¦åä¼æ¥åºå¼å¸¸ï¼
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?