Hi Dianne,

I have exactly the same problem. The functionality was broken since I
move to v10 and now to 2.0.1
I wrote the question as "Different behaviour between SDK 1.6 and SDK
2.0 - bug? Please help." in developers forum month ago but no answer.
Anyway when i'm commenting the line
        context.getBaseContext().getResources().updateConfiguration
(config, context.getBaseContext().getResources().getDisplayMetrics());
the application is starting properly. No localization changes is
available but at least it's running.

I can send you source code if you need to investigate it.

Thanks,
Evgeny


On Nov 9, 11:15 pm, Dianne Hackborn <[email protected]> wrote:
> No, changing the application's locale like this is not supported, and will
> not entirely work.  It shouldn't cause an activity to restart though...
> actually I can't imagine how this would cause an activity to restart, since
> this method is much lower-level than the activity.  Maybe the process is
> crashing for some reason in this call?
>
> 2009/11/9 Bahadır Yağan <[email protected]>
>
>
>
>
>
> > Does anyone know if this method of changing Locale just for one application
> > is a supported functionality?
>
> > --
> > Bahadır Yağan
>
> > On Mon, Nov 9, 2009 at 12:18 PM, ydario <[email protected]> wrote:
>
> >> Hi,
>
> >> found the same problem here. Even this kind of code fails:
>
> >>        Configuration config = context.getResources().getConfiguration();
> >>        config.locale = newLocale;
> >>         context.getResources().updateConfiguration(config,
> >>                        context.getResources().getDisplayMetrics());
>
> >> where newLocale is a properly created locale instance.
>
> >> The strange thing is that I can get the above code to work when my
> >> wizard library is running; the library code does not implement a new
> >> activity, but simply uses the existing one. I compared code, but I
> >> cannot find other real differences.
>
> >> And I'm getting the resume problem also when I start an activity from
> >> a non-GUI class, this worked from 1.1 to 1.6 :-(
>
> >> Yuri
>
> >> --
> >> 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]<android-developers%2bunsubs­[email protected]>
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >  --
> > 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]<android-developers%2bunsubs­[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.- Hide quoted text -
>
> - Show quoted text -

-- 
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