Update language in Widget

by Ricardo A . S谩 » Fri, 26 Mar 2010 19:59:51 GMT

Sponsored Links
 I have a widgett that supports for many languages, but if the user change
the language in Settings, my widget don't update.. Only works, if I close it
and open again, or rebook the handset..
Someone have any suggestion for me to solve this?



Update language in Widget

by Mark Murphy » Fri, 26 Mar 2010 20:08:02 GMT


I suspect that there is no automatic answer.

Android applications can find out about language changes via
onConfigurationChanged() (in Activity or Service) or the
ACTION_CONFIGURATION_CHANGED broadcast Intent. That Intent, though, must
be registered via registerReceiver() from a running component, making it
less than useful. Since you (hopefully) do not have a Service running
all the time in support of the app widget, the app widget itself cannot
use any of these.

You might wish to file a feature request on  http://b.android.com  -- I
would think that app widgets should be notified of configuration
changes, somehow, to handle your situation.

Beyond that, you could add a "refresh" button to the widget, or
otherwise allow them to tap something that, among other things, will
pick up the new language.

And, if you are lucky, somebody else will have a better idea...

Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Training...At Your Office:  http://commonsware.com/training 


Sponsored Links

Other Threads

1. AlertDialog's good looks for an Activity?

I like the looks of the Alert Dialog and wonder if there is any official way
to use those looks (icon, title, divider, grey gradient background for the
button bar) in an Activity?

The Activity does the same thing as a dialog, and uses Theme.Dialog, but
must be an Activity.



2. Android Hooking API


I want to develop a service that listens what are doing all
applications that are runing on my phone (listen phone calls, rewding/
writing on files,..system calls). Is there any kind of hooking api to
get this info or is not posible to get it? maby coding on native



3. How to become a featured app in the Android market

4. Android USB Networking.

5. HELP : Icon Aplikasi Ilang

6. Modifying date and time pickers

7. Retriving a different icon when my app targets minSdkVersion 3 and 4