Changing Android widget settings after creating?

Say that my application has a widget, and I use the configuration screen to complete the initial setup of the application widget and set a few settings.

I want the user to be able to change these settings by simply going to the settings screen of my application and clicking the "Preference" button to open the same parameters that were provided to the user when creating the application.

Can the same activity be used as configuration activity? Should I treat him differently? How to update an existing widget with new settings?

How can I make this work?

+6
android widget preferences
source share
1 answer

Can I use the same activity as the configurations?

Yes.

Should I treat him differently?

Not really, as far as I remember.

How does an existing widget get updated with new settings?

The same thing is happening now, since your customization activity is responsible for starting the initial update of the application widget contents.

How can I make this work?

Here is a sample application widget project using a button in the application widgets that redirects you back to configuration activity.

+3
source share

All Articles