android - Switching fragment - Google map V2 view not hiding -
i making android application several fragments. first fragment composed elements , viedo view :
when i'm switching on fragment google map view, transaction works fine, when come on first fragment, map view isn't hidden :
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
Post a Comment