PopupWindow写在fragment中的时候写错了父act

2018-10-29  本文已影响10人  在下陈小村

Thread ID: 546 Thread Name: pool-2-thread-2 Time: 2018-10-29 09:01:10:02 FromClass: CrashHandler > ↓↓↓↓exception↓↓↓↓
java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.IBinder android.view.View.getWindowToken()' on a null object reference
at android.widget.PopupWindow.showAtLocation(PopupWindow.java:908)
at com.ganjie.app.home.fragment.HomeGoodsFragment7.onItemChildClick(HomeGoodsFragment.java:432) at com.chad.library.adapter.base.BaseViewHolder1.onClick(BaseViewHolder.java:390)
at android.view.View.performClick(View.java:4874)
at android.view.ViewPerformClick.run(View.java:20341) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:5958) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInitMethodAndArgsCaller.run(ZygoteInit.java:1113)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:879)

上一篇下一篇

猜你喜欢

热点阅读