I'm assuming based on your initial question that you really only care
about screen orientation changes, correct?

Keep in mind that, by default, Android will assume that each of your
Activities can deal with screen orientation changes.  You have to
explicitly tell Android that your Activity is to be used in a specific
orientation if you want to do that.

Also, it's important to realize that when you have a current activity
displayed, and the user changes the screen orientation that your
current activity will be destroyed and a new one created.   That's why
you need a saved instance Bundle so you can save off your current
state and then restore it when your view gets destroyed and recreated.

- Mike

On Oct 8, 1:05 pm, James Yum <[email protected]> wrote:
> Hi Stefan,
> You probably shouldn't handle the config changes, just for the purpose of
> keeping your activity alive. Just save the instance state like you were
> originally planning.
>
> Cheers,
> James
>
> On Wed, Oct 7, 2009 at 11:17 PM, Stefan <[email protected]> wrote:
>
> > Hi Mike,
>
> > thanks for your answer.
>
> > No, I don't implement the Serializible Interface. The class gets the
> > lon/lat pairs and if i call saveFile()-method, I save my way- and
> > trackpoints on the sdcard (my source code blow up so i decide to
> > implement this in an own class).
> > Now my question is:  if I have stored many way- and trackpoints and if
> > the config change  i call getTrackpoints() for example - how efficient
> > is that and how fast is that??
> > I use a StringBuilder with: <trkpt lat=\""+lat+"\" lon=\""+lon+"\">\n"
> > +"</trkpt>". So if i get a new location each second and if my track is
> > 20km long, i think, that this is a cost-afflicted function (i don't
> > drive, i walk or i drive with a bike)?
> > I never implement the Serializible interface. Is this the best way??
> > Whats up with the efficency in this case (battery, responsivness and
> > so on)
> > My Location variables only holds lat and lon value. This is not the
> > problem.
>
> > Thanks,
> > Stefan
--~--~---------~--~----~------------~-------~--~----~
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