Re: [android-developers] loading SharedPreferences in Fragment

2013-02-22 Thread Marcelo Corvezola
Thank for the reply guys, regarding the link that where I got this SharedPreferences sp = this.getActivity().**getSharedPreferences("** CHECKBOX", 0); I've been going over the documentation trying to figure it out Saving Key-Value Sets | Android Developers

Re: [android-developers] loading SharedPreferences in Fragment

2013-02-21 Thread Tamilarasi Sivaraj
Hi, The following link is got the Android SharedPreferences in Fragment http://stackoverflow.com/questions/11741270/android-sharedpreferences-in-fragment Regards Android developer Trinay Technology Solutions www.trinaytech.com 5705750475 On Friday, February 22, 2013 8:09:39 AM UTC+5:30, Marcelo C

Re: [android-developers] loading SharedPreferences in Fragment

2013-02-21 Thread 牛浩博
SharedPreferences sp1 = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences sp2 = this.getActivity().getSharedPreferences("CHECKBOX", 0); sp1 != sp2 not same file 2013/2/22 Marcelo Corvezola > Hmm thnx..I must be doing something else wrong then..cause when I use this

Re: [android-developers] loading SharedPreferences in Fragment

2013-02-21 Thread Marcelo Corvezola
Hmm thnx..I must be doing something else wrong then..cause when I use this code private void loadPrefs() { ///SharedPreferences sp = this.getActivity().getSharedPreferences("CHECKBOX", 0); SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences( this); boolean cbValue = sp.g

Re: [android-developers] loading SharedPreferences in Fragment

2013-02-21 Thread Mark Murphy
Using the exact same code, if you wish. On Thu, Feb 21, 2013 at 7:40 PM, Marcelo Corvezola wrote: > Normally I use something like the code below to load sharedPreference into > an activity.. > > loadPrefs(); > > } > > > private void loadPrefs() { > > SharedPreferences sp = PreferenceManager.getDe

[android-developers] loading SharedPreferences in Fragment

2013-02-21 Thread Marcelo Corvezola
Normally I use something like the code below to load sharedPreference into an activity.. loadPrefs(); } private void loadPrefs() { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this); boolean cbValue = sp.getBoolean("CHECKBOX", false); String name = sp.getString("NAM