Long startup time for MapActivity derived classes?

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


Sponsored Links
 Hi,

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
like:

   public class MyActivity extends MapActivity {

       private MapView mMap;

       public void onCreate() {
           super.onCreate();

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

      public void goIntoMapMode() {
          if (mMap == null) {
              mMap = new MapView();
              addView(mMap);
          }
          mMap.bringToFront();
   }

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?

Thanks

--



Other Threads

1. AndroArena.com

New Android portal is starting soon. Be first to join forum
community.
http://forum.AndroArena.com
--~--~---------~--~----~------------~-------~--~----~

2. how can i show another spinner when one select an item from spinner

THIS I S THE CODE WHICH CALLS THE ANOTHER FILE WHICH OPENS ANOTHER
ShowMovie CLASS WHICH HA S TWO SPPINER
public class Movieselect extends MapActivity {
 public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);

spinner.setOnItemSelectedListener(new
AdapterView.OnItemSelectedListener(){

                        public void onItemSelected(AdapterView parent, View v,
                                        int position, long id) {
                                // TODO Auto-generated method stub
                                //openSpinner();
                        }

                        public void onNothingSelected(AdapterView arg0) {
                                // TODO Auto-generated method stub

                        }

        });
}

    private void openSpinner(){
        Intent i = new Intent(this,ShowMovie.class);
        startSubActivity(i, ACTIVITY_NAVIGATE);
    }
 }

BUT I GETTING AN EXCEPTION android.view.ViewInflate$InflateException
PLEASE HELP ME I WANT TO KNOW HOW THIS CAN BE SOLVED
--~--~---------~--~----~------------~-------~--~----~

3. About Telnet

4. draw view onto bitmap

5. Kernel Level Changes

6. creating a transition between two views

7. bindService() does not start the service