How to pass custom object arraylist from activity to fragment with instance
问题 I am using viewpager and creating fragments and i want to pass the arraylist. So i have tried the below things: MainActivity: private ArrayList<customers> mArrayList = null; ViewPagerAdapter adapter = new ViewPagerAdapter(MainActivity.this.getSupportFragmentManager()); adapter.addFrag(NewCustomer.newInstance(mArrayList ), "NewCustomer"); Now in fragment class i am creating instance: public static final ArrayList<customers> data = new ArrayList<customers>(); public static final NewCustomer