That's exactly what I thought should be done. However, as soon as I put 1 in for the default value, I get the following exception and stack trace. Without a default value set, everything runs fine.
I/ActivityManager( 53): Displayed activity com.shipmate/.Preferences: 1158 ms (total 1158 ms) D/dalvikvm( 230): GC freed 3166 objects / 177680 bytes in 133ms D/AndroidRuntime( 230): Shutting down VM W/dalvikvm( 230): threadid=3: thread exiting with uncaught exception (group=0x4 001b188) E/AndroidRuntime( 230): Uncaught handler: thread main exiting due to uncaught e xception E/AndroidRuntime( 230): java.lang.NullPointerException E/AndroidRuntime( 230): at android.preference.ListPreference.findIndexOf Value(ListPreference.java:169) E/AndroidRuntime( 230): at android.preference.ListPreference.getValueInd ex(ListPreference.java:178) E/AndroidRuntime( 230): at android.preference.ListPreference.onPrepareDi alogBuilder(ListPreference.java:190) E/AndroidRuntime( 230): at android.preference.DialogPreference.showDialo g(DialogPreference.java:294) E/AndroidRuntime( 230): at android.preference.DialogPreference.onClick(D ialogPreference.java:265) E/AndroidRuntime( 230): at android.preference.Preference.performClick(Pr eference.java:811) E/AndroidRuntime( 230): at android.preference.PreferenceScreen.onItemCli ck(PreferenceScreen.java:190) E/AndroidRuntime( 230): at android.widget.AdapterView.performItemClick(A dapterView.java:284) E/AndroidRuntime( 230): at android.widget.ListView.performItemClick(List View.java:3285) E/AndroidRuntime( 230): at android.widget.AbsListView $PerformClick.run(A bsListView.java:1640) E/AndroidRuntime( 230): at android.os.Handler.handleCallback(Handler.jav a:587) E/AndroidRuntime( 230): at android.os.Handler.dispatchMessage(Handler.ja va:92) E/AndroidRuntime( 230): at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 230): at android.app.ActivityThread.main(ActivityThrea d.java:4363) E/AndroidRuntime( 230): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 230): at java.lang.reflect.Method.invoke(Method.java:5 21) E/AndroidRuntime( 230): at com.android.internal.os.ZygoteInit $MethodAndA rgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime( 230): at com.android.internal.os.ZygoteInit.main(Zygot eInit.java:618) E/AndroidRuntime( 230): at dalvik.system.NativeStart.main(Native Method) I/Process ( 53): Sending signal. PID: 230 SIG: 3 I/dalvikvm( 230): threadid=7: reacting to signal 3 I/dalvikvm( 230): Wrote stack trace to '/data/anr/traces.txt' -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

