/** Returns a new instance of this fragment for the given section number. */ public static Message_Frag newInstance(int sectionNumber) { Message_Frag fragment = new Message_Frag(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; }
@Override public Fragment getItem(int position) { switch (position) { case 0: return StaggeredGridFragment.newInstance(position + 1); case 1: return Contact_Frag.newInstance(position + 1); case 2: return Message_Frag.newInstance(position + 1); case 3: // return Contact_Frag.newInstance(position + 1); return Calllog_Frag.newInstance(position + 1); } return null; }