Android PopupWindow.showAsDropDown报错:BadTokenException: Unable to add window
Android PopupWindow.showAsDropDown报错:
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
在show之前前,多加一个判断拦截:
你的viewAnchor.windowToken != null
Android PopupWindow_android popupwindow 获取resources-CSDN博客文章浏览阅读287次。代码:package zhangphil.test;import android.content.Context;import android.content.res.Resources;import android.graphics.Color;import android.os.Bundle;import android.support.annotation.Nullable..._android popupwindow 获取resourceshttps://blog.csdn.net/zhangphil/article/details/82850102