You might want to take a look at setRequestedOrientation if u want
to ..
On Apr 24, 1:53 pm, Wang He 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 onConfi
You realize that you need to save and restore your state to work correctly
anyway, right? If you don't, you will lose your state when the user returns
to it after it was killed in the background.
So do that first. Seriously. You have to do it anyway.
Then once you have that working, you can lo
You don't have to load and save that stuff, you can put references to
your runtime data in a custom class and return that in
Activity.onRetainNonConfigurationInstance() (http://
developer.android.com/reference/android/app/
Activity.html#onRetainNonConfigurationInstance()) and get it in
Activity.g
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 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;
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) {
s
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 giv
Is here anybody knows the right way?
Still waiting ...
BRs
He
On Apr 24, 4:53 pm, Wang He 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 onConfigurationCh
Why do so much people avoid the destoying and recreation of Activities
on orientation change. It's there to make the switch to a different
orientation easier, because it automatically loads the correct
resources. To be honest, I don't fully understand the whole recreation
of Activities neither, as
8 matches
Mail list logo