You can checkout this example. http://mylifewithandroid.blogspot.com/2008/05/expandable-lists.html
On Wed, Nov 3, 2010 at 11:15 PM, Kumar Bibek <[email protected]> wrote: > Oops, sorry, I missed that. I was of the impression that you are using a > custom adapter. > > I now think there must be something wrong with the adapter initialization. > Will check and get back in some time. > > On Wed, Nov 3, 2010 at 11:10 PM, dashman <[email protected]> wrote: > >> >> if you look at the stack trace - it's all google code. >> >> i'm just clicking on the group button. >> >> i believe my code does not figure in this stack dump. >> >> >> On Nov 3, 1:25 pm, Kumar Bibek <[email protected]> wrote: >> > Well, getChildrenCount method is the one which is throwing this >> exception. >> > You are requesting an index 0 of an array which doesn't have any >> elements. >> > >> > Can you post some code? >> > >> > >> > >> > On Wed, Nov 3, 2010 at 10:53 PM, dashman <[email protected]> wrote: >> > > here you - >> > >> > > this is a list with 1 group parent and no children. >> > > i click on the group and i get the following: >> > >> > > FATAL EXCEPTION: main >> > > java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 >> > > at >> > > java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:257) >> > > at java.util.ArrayList.get(ArrayList.java:311) >> > > at >> > >> > > >> android.widget.SimpleExpandableListAdapter.getChildrenCount(SimpleExpandableListAdapter.java: >> > > 255) >> > > at >> > >> > > >> android.widget.ExpandableListConnector.refreshExpGroupMetadataList(ExpandableListConnector.java: >> > > 561) >> > > at >> > >> > > >> android.widget.ExpandableListConnector.expandGroup(ExpandableListConnector.java: >> > > 682) >> > > at >> > > >> android.widget.ExpandableListView.handleItemClick(ExpandableListView.java: >> > > 567) >> > > at >> > > >> android.widget.ExpandableListView.performItemClick(ExpandableListView.java: >> > > 527) >> > > at android.widget.AbsListView$PerformClick.run(AbsListView.java: >> > > 1696) >> > > at android.os.Handler.handleCallback(Handler.java:587) >> > > at android.os.Handler.dispatchMessage(Handler.java:92) >> > > at android.os.Looper.loop(Looper.java:123) >> > > at android.app.ActivityThread.main(ActivityThread.java:4627) >> > > at java.lang.reflect.Method.invokeNative(Native Method) >> > > at java.lang.reflect.Method.invoke(Method.java:521) >> > > at com.android.internal.os.ZygoteInit >> > > $MethodAndArgsCaller.run(ZygoteInit.java:868) >> > > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) >> > > at dalvik.system.NativeStart.main(Native Method) >> > >> > > -- >> > > You received this message because you are subscribed to the Google >> > > Groups "Android Developers" group. >> > > To post to this group, send email to >> [email protected] >> > > To unsubscribe from this group, send email to >> > > [email protected]<android-developers%[email protected]> >> <android-developers%[email protected]<android-developers%[email protected]> >> > >> > > For more options, visit this group at >> > >http://groups.google.com/group/android-developers?hl=en >> > >> > -- >> > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Kumar Bibek > http://techdroid.kbeanie.com > http://www.kbeanie.com > > -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

