[android-developers] Re: Trouble programmatically setting default value of a Preference

2011-08-24 Thread jamesc
You should do something like: public void onCreate() { addPreferencesFromResource(R.xml.prefs); CheckBoxPreference pref = (CheckBoxPreference) findPreference(blargh); if(pref != null) { pref.setChecked(true); } } On Aug 23, 11:24 pm, b0b pujos.mich...@gmail.com wrote: I have a

[android-developers] Re: Trouble programmatically setting default value of a Preference

2011-08-23 Thread lbendlin
this is what helped me in a similar situation http://android-journey.blogspot.com/2010/01/for-almost-any-application-we-need-to.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to