What you need to be aware of using type in ListView
When using the ListView, if Getitemviewtype is used, remember that his value must have been counted from 0. And you want to overwrite the Getviewtypecount method. and let Getviewtypecount>getitemviewtype
Otherwise there will be an array out-of-bounds exception:
10-21 20:18:16.231:e/androidruntime (4475): java.lang.arrayindexoutofboundsexception:length=3; Index=310-21 20:18:16.231:e/androidruntime (4475): at Android.widget.abslistview$recyclebin.addscrapview ( abslistview.java:6437) 10-21 20:18:16.231:e/androidruntime (4475): at Android.widget.ListView.layoutChildren ( listview.java:1559) 10-21 20:18:16.231:e/androidruntime (4475): at android.widget.AbsListView.onLayout ( abslistview.java:2102) 10-21 20:18:16.231:e/androidruntime (4475): at Se.davison.sodatools.widget.SectionListView.onLayout (sectionlistview.java:147) 10-21 20:18:16.231:e/ Androidruntime (4475): at android.view.View.layout (view.java:13754) 10-21 20:18:16.231:e/androidruntime (4475): At android.view.ViewGroup.layout (viewgroup.java:4362)
Use the type in the ListView to be aware of something java.lang.arrayindexoutofboundsexception:length=2; index=2 Addscrapview