Closed GoogleCodeExporter closed 9 years ago
Do you happen to have a stacktrace of this issue? And another question - do you
change dynamically the content of the tree (and specifically the depth of it?
Because it might be caused by that.....
Original comment by ja...@potiuk.com
on 8 Sep 2011 at 2:43
The user can load different content in the tree, but the exception only happens
when I am scrolling though the tree list. When the crash happens I'm not
changing any of the content of the tree.
here's the stack trace
java.lang.ArrayIndexOutOfBoundsException
at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:3523)
at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2445)
at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:2313)
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:4203)
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:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
at dalvik.system.NativeStart.main(Native Method)
Original comment by christop...@gmail.com
on 8 Sep 2011 at 9:37
Overriding view count is not a problem on its own. this is is the only way to
use different views at different tree levels (which was my intention). When you
create adapter you specify how many levels the tree should be (numberOfLevels
parameter) at the time when you construct the adapter. If you happen to have
more levels in the tree than specified at creation time - this is exactly when
this error happens ... I think this is your problem really, because they way
adapter is written - the viewtypecount cannot change (it is set in constructor)
and the SO link mentions about dynamic count changing ..... Can you post your
initialisation code and see more closely how deep your tree can become?
Original comment by ja...@potiuk.com
on 10 Sep 2011 at 6:49
Original issue reported on code.google.com by
christop...@gmail.com
on 18 Aug 2011 at 12:42