錯誤1:
1.onScrollChanged(PopupWindow.java:127607145313351991991504385507849607
這個錯誤經常出現在Gingerbread或更早的版本,3.0以下。是系統的bug
解決方案:
new PopupWindow之後加上如下的方法進行檢查即可,為了相容3.0以下版本,這個操作還是必要的
fixPopupWindow( (Build.VERSION.SDK_INT < Field fAnchor = PopupWindow."mAnchor"= PopupWindow."mOnScrollChangedListener" ViewTreeObserver.OnScrollChangedListener originalListener == <View> mAnchor = (WeakReference<View> (mAnchor == || mAnchor.get() ==
參考:
https://github.com/JakeWharton/ActionBarSherlock/issues/752
https://groups.google.com/forum/?fromgroups=#!msg/osmeditor4android/RsHYoY6XqlU/-WGSKWm5OMAJ
錯誤2:
1426262725921881991303687507867625
解決方案:建立PopupWindow 的時候不調用 setFocusable(true),在showAtLocation後在調用setFocusable(true);並且在 dismiss的時候 調用setFocusable(false)
參考:
http://stackoverflow.com/questions/7768728/popupwindow-crash-on-dispatch-event
http://www.eoeandroid.com/thread-109193-1-1.html