I have an application, where I need to change the language through a
settings menu. The problem is that the current activity don’t show
data in new language only if I go back (by back button)to the main
activity. I ask if there is any solution to reload the current
activity(and other)…I want anywhere in my app change the language(by
using a menu)and have  data in new language without going back to main
activity.(I must still in  the current activity witch show data and
resouce in new language)

This is the code that I write it in every activity:

new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog,int which) {

        switch(Item_id){

        case 0:
          Toast.makeText(getApplicationContext(),
Item_name,Toast.LENGTH_SHORT).show();

                // Change locale settings on the device
                  locale = new Locale("En");
                  Locale.setDefault(locale);
                  config = new Configuration();
              config.locale = locale;
                  getBaseContext().getResources().updateConfiguration(config,
              getBaseContext().getResources().getDisplayMetrics());

           case 1:
           ………………………………………..
                                        }
 }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to