I use a BaseAdapter to manage and show data to a listview. I use a Thread to add element to BaseAdapter one by one,and after each one be added I call BaseAdapter's notifyDataSetChanged(). At the same time ,I use a timer and timertask to scroll the listview, and update the element in BaseAdapter,after the update ,I call BaseAdapter's notifyDataSetChanged().
and so,some times there is a NullPointerException java.lang.NullPointerException at android.widget.ListView.setupChild(ListView.java:1838) at android.widget.ListView.makeAndAddView(ListView.java:1816) at android.widget.ListView.fillDown(ListView.java:738) at android.widget.ListView.fillSpecific(ListView.java:1370) at android.widget.ListView.layoutChildren(ListView.java:1644) at android.widget.AbsListView.onLayout(AbsListView.java:1259) at android.view.View.layout(View.java:7035) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:909) at android.view.View.layout(View.java:7035) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:7035) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:7035) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:7035) at android.widget.FrameLayout.onLayout(FrameLayout.java:333) at android.view.View.layout(View.java:7035) at android.view.ViewRoot.performTraversals(ViewRoot.java:1054) at android.view.ViewRoot.handleMessage(ViewRoot.java:1749) at android.os.Handler.dispatchMessage(Handler.java:99) 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:871) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) at dalvik.system.NativeStart.main(Native Method) can anyone help me?thanks very much. -- 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

