jeudi 21 mai 2015

GoogleMap disappears when Activity switches to another

I am working on an App which have many activities. One of these activities have Google Map in it. On click of a button in this activity I launch another activity which is used to show custom dialogues, so this activity is transparent around the edges. When this activity launches I can see the GoogleMap lying underneath it as it is transparent. Fine upto this point.

Now on click of a button in this transparent activity I launch a third activity but I don't finish this current transparent activity it remains in the stack. So basically the activity stack looks like this -

Activity A (Map) --> Activity B (Transparent) --> Activity C

When I close Activity C by pressing the hardware back button, it obviously pops off the stack, so Activity B again comes in foreground, but now the Map in Activity A (which is still in the stack under Activity B) is gone completely , I can see under Activity B (as it is transparent) that every other UI element of Activity A is there except Map.

How is this happening, anyone got any idea ?

Aucun commentaire:

Enregistrer un commentaire