tjerkw / Android-SlideExpandableListView

A better ExpandableListView, with animated expandable views for each list item
Apache License 2.0
1.98k stars 741 forks source link

NullPointerException at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter.enableFor(AbstractSlideExpandableListAdapter.java:211) #88

Closed samkazmi closed 9 years ago

samkazmi commented 10 years ago

10-02 17:29:28.127: E/AndroidRuntime(31121): FATAL EXCEPTION: main 10-02 17:29:28.127: E/AndroidRuntime(31121): java.lang.NullPointerException 10-02 17:29:28.127: E/AndroidRuntime(31121): at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter.enableFor(AbstractSlideExpandableListAdapter.java:211) 10-02 17:29:28.127: E/AndroidRuntime(31121): at com.tjerkw.slideexpandable.library.AbstractSlideExpandableListAdapter.getView(AbstractSlideExpandableListAdapter.java:127) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.AbsListView.obtainView(AbsListView.java:2207) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.ListView.makeAndAddView(ListView.java:1845) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.ListView.fillDown(ListView.java:678) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.ListView.fillFromTop(ListView.java:739) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.ListView.layoutChildren(ListView.java:1661) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.AbsListView.onLayout(AbsListView.java:2037) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.View.layout(View.java:14173) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewGroup.layout(ViewGroup.java:4484) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.FrameLayout.onLayout(FrameLayout.java:448) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.View.layout(View.java:14173) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewGroup.layout(ViewGroup.java:4484) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1670) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1528) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.LinearLayout.onLayout(LinearLayout.java:1441) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.View.layout(View.java:14173) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewGroup.layout(ViewGroup.java:4484) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.widget.FrameLayout.onLayout(FrameLayout.java:448) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.View.layout(View.java:14173) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewGroup.layout(ViewGroup.java:4484) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2213) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1977) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1166) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5013) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:776) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.Choreographer.doCallbacks(Choreographer.java:579) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.Choreographer.doFrame(Choreographer.java:548) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:762) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.os.Handler.handleCallback(Handler.java:725) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.os.Handler.dispatchMessage(Handler.java:92) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.os.Looper.loop(Looper.java:153) 10-02 17:29:28.127: E/AndroidRuntime(31121): at android.app.ActivityThread.main(ActivityThread.java:5299) 10-02 17:29:28.127: E/AndroidRuntime(31121): at java.lang.reflect.Method.invokeNative(Native Method) 10-02 17:29:28.127: E/AndroidRuntime(31121): at java.lang.reflect.Method.invoke(Method.java:511) 10-02 17:29:28.127: E/AndroidRuntime(31121): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) 10-02 17:29:28.127: E/AndroidRuntime(31121): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 10-02 17:29:28.127: E/AndroidRuntime(31121): at dalvik.system.NativeStart.main(Native Method)

samkazmi commented 10 years ago

Please Help....!

zhaoyubin2012 commented 10 years ago

i hava the same question.........

zhaoyubin2012 commented 10 years ago

We can find this demo on other website and it doesn't the question

samkazmi commented 9 years ago

Yeah..... although not using it anymore....

xarlotie commented 9 years ago

I just cleaned the projects and rebuild. Works fine after that.

samkazmi commented 9 years ago

Now my work is done... Thank you for replyin anyways

Sent from my iPhone

On Nov 25, 2014, at 2:44 PM, "xarlotie" notifications@github.com wrote:

I just cleaned the projects and rebuild. Works fine after that.

— Reply to this email directly or view it on GitHub.

arkangelx commented 9 years ago

Please has this issue been fixed?

samkazmi commented 9 years ago

Nope

Logan676 commented 9 years ago

I have the same problem, does anyone fixed this?

tjerkw commented 9 years ago

Guys please look at the example project, you need to properly implement View more = getExpandToggleButton(parent); View itemToolbar = getExpandableView(parent);

If these methods return null you will get this exception. If you are using a subclass of AbstractSlideExpandableListAdapter then please use the appropiate ids. Again look at the example.