Friday, February 4, 2011

[android-developers] Listview crash during orientation change

Hi,

I have a listview and is working good but i realize if I do a screen
orientation change it will crash. Why is that so?

Many thanks.

---
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): FATAL EXCEPTION: main
02-05 01:04:41.208: ERROR/AndroidRuntime(14593):
java.lang.NullPointerException
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.widget.SimpleAdapter.getCount(SimpleAdapter.java:93)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.widget.AdapterView.checkFocus(AdapterView.java:689)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.widget.AdapterView
$AdapterDataSetObserver.onInvalidated(AdapterView.java:813)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:
43)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.widget.BaseAdapter.notifyDataSetInvalidated(BaseAdapter.java:
54)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.widget.SimpleAdapter
$SimpleFilter.publishResults(SimpleAdapter.java:383)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.widget.Filter$ResultsHandler.handleMessage(Filter.java:282)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.os.Looper.loop(Looper.java:123)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
android.app.ActivityThread.main(ActivityThread.java:4627)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
java.lang.reflect.Method.invokeNative(Native Method)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
java.lang.reflect.Method.invoke(Method.java:521)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-05 01:04:41.208: ERROR/AndroidRuntime(14593): 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate