[Solved] How to parse JSON data into fragments?
you can parse like this: List<RidesData> ridesDatas; /* this is should be parcelable */ private void setupViewPager(ViewPager viewPager) { ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager()); adapter.addFragment(FragmentAbout.newInstance(ridesDatas), “ABOUT”); adapter.addFragment(FragmentPointOfInterest.newInstance(ridesDatas),”POI”); viewPager.setAdapter(adapter); } and set constructure to each fragment like this: FragmentAbout.class public static FragmentAbout newInstance(List<RidesData> ridesDatas) { FragmentAbout fragmentAbout = new FragmentAbout(); Bundle arg = new Bundle(); arg.putParcelableArrayList(“data”, … Read more