android - Switching fragment - Google map V2 view not hiding -


i making android application several fragments. first fragment composed elements , viedo view :enter image description here

when i'm switching on fragment google map view, transaction works fine, when come on first fragment, map view isn't hidden :

enter image description here

these 2 fragment allocated in main fragmentactivity , hide/show when it's necessary :

private void setfragment(fragment fragment) {     fragmenttransaction trans = getsupportfragmentmanager().begintransaction();     // if active fragment instance of accueilfragment hide 1       if(activefragment instanceof accueilfragment)     {         system.out.println("accueil fragment hide");         trans.hide(maccueilfragment);     }     // if active fragment instance of cataloguesfragment hide 1      if(activefragment instanceof cataloguesfragment)     {         system.out.println("ctalogue fragment hide");         trans.hide(mcataloguesfragment);     }     // if active fragment instance of magasinsfragment hide 1      if(activefragment instanceof magasinsfragment)     {         system.out.println("magasins fragment hide");         trans.hide(mmagasinsfragment);     }     // if active fragment instance of newsfragment hide 1      if(activefragment instanceof newsfragment)     {         system.out.println("news fragment hide");         trans.hide(mnewsfragment);     }     mlistfragments.add(fragment);     // set new active fragment     activefragment = fragment;     // show     trans.show(fragment);     // , commit transaction       trans.commit(); } 

it's appear google map view isn't hidden , pass in foreground, can me ?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -