Oh btw I purchased your "The Busy Coder's Guide to Android Development" book - its very helpful ;)
On Dec 8, 11:30 pm, mscwd01 <[EMAIL PROTECTED]> wrote: > Okay, one last question ;) > > I've noticed if I have one map in, say, "Activity1" and I call another > activity, "Activity2" which has a map within a tab of a TabHost - If I > press the back button and go from Activity2 to Activity1, the map in > Activity1 doesn't update i.e. load new tiles - only the map in the > TabHost of Activity2 will update from there on. > > Also I have noticed I am getting OutOfMemory errors after I switch > between the Activity1 and Activity2 several times. > > I tried overriding the onKeyDown method in the Activity of the tab in > Activity2 such as: > > @Override > public boolean onKeyDown(int keyCode, KeyEvent event) { > if (keyCode == KeyEvent.KEYCODE_BACK) { > Log.v("DEBUGTAG", "Back button pressed"); > //Process.killProcess(Process.myTid()); > finish(); > return (true); > } > return (super.onKeyDown(keyCode, event)); > > } > > If I just call finish(), I get the problem mentioned above, however if > I call: > Process.killProcess(Process.myTid()); > ... to kill Activity2 (the process holding the TabHost and which > created the tab content activity displaying the second map), the > problem doesnt seem to appear. However I guess this is a nasty hack - > it certainly causes the application to stutter before redisplaying > Activity1 again. > > Theres a lot there to take in I know ;) > However what i'm asking is, is there a way to kill off Activity2 > completely when pressing the Back button to return to Activity1 and > return full control to the first map? I believe I am making more and > more map objects when I launch Activity2 again and again and not > releasing resources when I finish with it? > > Hope I havent confused you ;) > > On Dec 8, 11:11 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > > > mscwd01 wrote: > > > I've had a look at the documentation you suggested, however I think im > > > misunderstanding how you launch a new activity in a seperate process. > > > Is there a demo which illustrates this? > > > Ummmm...none I'm aware of. The ApiDemos in the SDK show separate > > processes, but for services, not activities. > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com > > _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---