Search code examples
androidandroid-widgetpreferences

Widget Preferences "delay" problem


I have a Widget with his android.appwidget.action.APPWIDGET_CONFIGURE Activity with some preferences witch I can set before adding it to the "desktop".

My problem is that the preferences does not get applied because I noticed that as soon as the APPWIDGET_CONFIGURE is called, the widget is created and never refresh after the widget is actually applied to the screen and it actually never reads the updated preferences.

Any thoughts?

Thanks

Oh, I think I found what it seems to be an easy solution but I don't like it much so I like to have a "second opinion". I don't say what it is to not influence the answers.

PS. The configuration activity works fine, the problem is only when the widget is applied for the first time.


Solution

  • The (easy) solution I found is to call an update on the widget after closing the APPWIDGET_CONFIGURE Activity.

    The "dirty" thing I don't like is that you actually "draw" the widget one extra time.