Long startup time for MapActivity derived classes?

by Mark Wyszomierski » Sun, 29 Nov 2009 02:35:44 GMT

Sponsored Links

Does anyone else experience a longer load time for activities derived
from MapActivity vs Activity? In my situation, I have an activity that
can display info in either a list or map format. So my activity looks

   public class MyActivity extends MapActivity {

       private MapView mMap;

       public void onCreate() {

           // allocate MapView only when user chooses to use that
           // mMap = new MapView(...);

      public void goIntoMapMode() {
          if (mMap == null) {
              mMap = new MapView();

I notice that even though I'm not allocating the MapView instance up-
front, there's still  a longer load time for MapActivity than
Activity. If I derive from Activity, the load time of the Activity is
noticeably faster. Any way to speed things up other than separating
into two separate activities?