[android-developers] Re: PreferenceActivity and appWidgetId relation

2010-07-04 Thread Premier
I want to know how i can get shared preferences for each appWidgetId. Regards. On 4 Lug, 18:56, Premier a.grum...@gmail.com wrote: Hello, i'm using PreferenceActivity class to configure my widget. PreferenceActivity class automatically saves user preferences, so in widget update service i

Re: [android-developers] Re: PreferenceActivity and appWidgetId relation

2010-07-04 Thread Kostya Vasilyev
If you allow the user to configure individual widgets, then you need to store settings separately for each widgetId. I recently implemented this for my widgets, here is how: http://kmansoft.wordpress.com/2010/06/22/per-widget-options-stale-widgets/ -- Kostya 04.07.2010 21:22, Premier пишет:

[android-developers] Re: PreferenceActivity and appWidgetId relation

2010-07-04 Thread Premier
So, i can't use PreferenceActivity, is it right? On 4 Lug, 20:04, Kostya Vasilyev kmans...@gmail.com wrote: If you allow the user to configure individual widgets, then you need to store settings separately for each widgetId. I recently implemented this for my widgets, here is how:

Re: [android-developers] Re: PreferenceActivity and appWidgetId relation

2010-07-04 Thread YuviDroid
Basically what you should do is to use as 'key' a concatenation of your original preference key and the appWidgetId, which is what you can see in the code posted by Kostya. On Sun, Jul 4, 2010 at 7:22 PM, Premier a.grum...@gmail.com wrote: I want to know how i can get shared preferences for

[android-developers] Re: PreferenceActivity and appWidgetId relation

2010-07-04 Thread Premier
If you lookt at here (http://github.com/commonsguy/cw-advandroid/blob/ master/AppWidget/TwitterWidget/src/com/commonsware/android/appwidget/ TwitterWidget.java) Mark Murphy use PreferenceActivity to store widget preferences, and after it uses

[android-developers] Re: PreferenceActivity and appWidgetId relation

2010-07-04 Thread Premier
With PreferenceActivity, you haven't to set Preference name, it is managed by framework. Is it right? On 4 Lug, 20:09, YuviDroid yuvidr...@gmail.com wrote: Basically what you should do is to use as 'key' a concatenation of your original preference key and the appWidgetId, which is what you can