android - Fragment manager Getting into custom adapter -


in adapter want navigate different fragments

  public navadapter(context context, arraylist<navitems> navitems) {     this.navitems = navitems;     this.context = context;    } 

in above adapter constructor managed context , how fragmentmanager ?

  youractivity mainactivity = (youractivity) context;   fragmentmanager manager = mainactivity.getsupportfragmentmanager(); 

you can use fregmantmanager , perform transaction .


Comments

Popular posts from this blog

javascript - Feed FileReader from server side files -

c++ - What's the differece between of link to a dynamic file and as a input object? -

Android Unit Testing / Mockito: android.location.Location not mocked -