Hi,
I'm working on a class containing a mapView and some other layers.
When calculating itinerary, I have the possibility to show the road
instructions on a listView called on another class.
>From the listView, when pressing/selection an instruction, my app
should go back to tha map class to focus on that instruction
coordinates.
The problem is, when coming back to the map class, I got an error and
my app crashes.
Here is the code of ListView calling mapView class

    final Intent i = new Intent(this, MapItineraire.class);
                maListViewPerso.setOnItemClickListener(new 
OnItemClickListener() {
                        @Override
                        @SuppressWarnings("unchecked")
                        public void onItemClick(AdapterView<?> a, View v, int 
position,
long id) {
                                HashMap<String, String> map = (HashMap<String, 
String>)
maListViewPerso
                                                .getItemAtPosition(position);

                                Bundle infoBundle = new Bundle();
                                infoBundle.putInt("position", position);
                                i.putExtras(infoBundle);
                                startActivity(i);

                        }

                });

the mapView class contain MapView, some Layouts(as layers),
LocationListner...
I kept on resume empty, I got the crash

        @Override
        protected void onResume() {
                super.onResume();
                Bundle extras = getIntent().getExtras();
                if (extras != null) {
                position = extras.getInt("position");
                }
        }

PS: I can get the extra but the app crashes

How can I reload the last State of mapView class?

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