Yesterday, the tester submitted to me a bug, in version 2.3, when the pop-up Popupwindow, there will be a null pointer exception, in the high version no problem, the following is the error message (Find the same exception, my exception has been resolved)
Exception information: exception:null stack information: Android.widget.PopupWindow.setContentView (popupwindow.java:384) Android.widget.popupwindow.<init> (popupwindow.java:286) android.widget.popupwindow.<init> ( popupwindow.java:266) android.widget.popupwindow.<init> (popupwindow.java:223) Net.oschina.gitapp.widget.dropdownmenu.<init> (dropdownmenu.java:34) Net.oschina.gitapp.ui.ProjectActivity.initMoreMenu (projectactivity.java:255) NET.OSCHINA.GITAPP.UI.PROJECTACTIVITY.ACCESS$10 (projectactivity.java:254) net.oschina.gitapp.ui.ProjectActivity $3.onpostexecute (projectactivity.java:385) Net.oschina.gitapp.ui.projectactivity$3.onpostexecute ( projectactivity.java:1) Android.os.AsyncTask.finish (asynctask.java:417) android.os.asynctask.access$300 ( asynctask.java:127) Android.os.asynctask$internalhandler.handlemessage (asynctask.java:429) Android.os.Handler.dispatchMessage (handler.java:99) android.os.Looper.loop (looper.java:130) Android.app.ActivityThread.main (activitythread.java:3691) java.lang.reflect.Method.invokeNatIve (Native Method) Java.lang.reflect.Method.invoke (method.java:507) com.android.internal.os.zygoteinit$ Methodandargscaller.run (zygoteinit.java:912) com.android.internal.os.ZygoteInit.main (zygoteinit.java:670) Dalvik.system.NativeStart.main (Native Method)
This is due to the absence of a super (context) call in the constructor method, only the super (context) can be called in the first row of the constructor method.
"Android Development Experience" low version of Popupwindow init method null pointer exception problem