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
Post a Comment