Hi,
There are various options mentioned here.
http://www.devx.com/wireless/Article/40792/0/page/1
see if this helps...

On Mon, Apr 27, 2009 at 1:55 PM, Wang He <[email protected]> wrote:

>
> 1. I don't want to  recreate the activity when switching at Land &
> Port, many runtime data I don't want to save and reload;
> 2. So I use onConfigurationChanged() facility, but I have UI for Land
> & Port, What I do now is:
>    public void onConfigurationChanged(Configuration newConfig) {
>           setContentView() again as onCreate();
>          run findViewById()s as handlers will lost after
> setContentView();
>          setListeners for UI widgets as they will lost also;
>  }
>
> 3. Is the way right I did in 2?
>
> BRs
> He
>
> On Apr 27, 11:14 am, Dianne Hackborn <[email protected]> wrote:
> > If you actually have resources that change due to these states, you
> really
> > should consider letting the normal destroy/recreate behavior execute.
> > Otherwise, you will just need to poke through your UI, reloading and
> > resetting resources that may have changed.  There is no simple answer
> that
> > can be given about what to do, because it depends entirely on what you
> need
> > to have change (and you haven't said anything here about what you
> actually
> > need to change).
> >
> >
> >
> > On Sun, Apr 26, 2009 at 7:56 PM, Wang He <[email protected]> wrote:
> >
> > > Is here anybody knows the right way?
> > > Still waiting ...
> >
> > > BRs
> > > He
> >
> > > On Apr 24, 4:53 pm, Wang He <[email protected]> wrote:
> > > > Hi all
> >
> > > > when I use android:configChanges="keyboardHidden|orientation" in my
> > > > code, the activity will not destroy and recreate when I change from
> > > > portrait to landscape, only onConfigurationChanged(newConfig) will be
> > > > called by framework.
> >
> > > > The issue is:
> > > > My UI cannot refresh by default, what is the correct way in
> > > > onConfigurationChanged() to refresh my UI?
> >
> > > > BTW, my UI is write with mylayout.xml and added to my Widget by
> addView
> > > > (inflator(mylayout.xml),null).
> >
> > > > Thanks in advance!!
> > > > BRs
> > > > Wang He
> >
> > --
> > 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.
> >
>

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