android - Having Fragment and List fragment in 1 adapter -
good afternoon guys,i need tip experienced people, here have fragment adapter :
public class mypageradapter extends fragmentstatepageradapter { private final string[] titles = { "categories", "home", "top paid" }; public mypageradapter(fragmentmanager fm) { super(fm); } @override public charsequence getpagetitle(int position) { return titles[position]; } @override public int getcount() { return titles.length; } @override public fragment getitem(int index) { switch (index) { case 0: // top rated fragment activity return new topratedfragment(); case 1: // games fragment activity return new gamesfragment(); case 2: // movies fragment activity return new noteactivity(); } return null; }
i have 3 fragments @ getitem() see, , constructor fragment type, need 1 of them listfragment, constructor doesnt accept, im stuck @ problem, please me clue? thanks
Comments
Post a Comment