Hello Mark. I want to use PreferenceActivity to set preferences for my widget. How i can retrieve widget preferences if i have many widget instances?
Thanks On 1 Giu, 18:39, Mark Murphy <mmur...@commonsware.com> wrote: > Donal Rafferty wrote: > > Thanks Mark. > > > To access my preferences outside my PreferenceActivity in another > > Activity or a Service can I use PreferenceManager. > > getDefaultSharedPreferences() also? > > Yes. That will return the same preferences for this application. > > > In your code here: > > >http://github.com/commonsguy/cw-android/blob/master/Prefs/Dialogs/src... > > > I see SharedPreferences prefs=PreferenceManager is used, is that > > correct? > > Well, there's more to it than that. You may need to scroll to the right. > > I'm going to need to switch to spaces instead of tabs, as my books need > two-space tabs, but GitHub uses eight-space tabs, so my code gets > stretched way out horizontally. :-( > > > Should I use it like that to retrieve my preferences eslewhere > > in my application? > > Sure. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ > Version 1.5 Available! -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en