android - want to include Fragments under tabFragment -


i have activity has navigation drawer , tabview viewpager. want open fragments inside tabview according selection in navigation drawer. how navigate fragments according selection

mnavigationview.setnavigationitemselectedlistener(new navigationview.onnavigationitemselectedlistener() {         @override         public boolean onnavigationitemselected(menuitem menuitem) {             mdrawerlayout.closedrawers();               if (menuitem.getitemid() == r.id.ap) {                 fragmenttransaction fragmenttransaction = mfragmentmanager.begintransaction();                 fragmenttransaction.replace(r.id.containerview, new fpfragment()).commit();              }              if (menuitem.getitemid() == r.id.vfp) {                 fragmenttransaction xfragmenttransaction = mfragmentmanager.begintransaction();                 xfragmenttransaction.replace(r.id.containerview, new veryfinfrag()).commit();             } 

is possible??


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -