Q:

How to put the ArrayList into bundle

I have put some value into arraylist like this : 
    private List<InfoProduct> product;

    product = new ArrayList<>();
    product.add(new InfoProduct(R.drawable.cloth, Product_title, "0", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.guitar, Product_title, "1", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.cloth, Product_title, "2", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.guitar, Product_title, "3", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.cloth, Product_title, "4", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.guitar, Product_title, "5", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.cloth, Product_title, "6", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.guitar, Product_title, "7", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.cloth, Product_title, "8", Product_data2, lunch,R.drawable.cardview_circle_corner));
    product.add(new InfoProduct(R.drawable.guitar, Product_title, "9", Product_data2, lunch,R.drawable.cardview_circle_corner));

when I need to go other Fragment , I want to use Bundle to transfer my ArrayList , so I write some code to comply this 
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    ft.replace(R.id.fragment_youtube, new FragmentYoutubeProduct(), "youtube");
    ft.addToBackStack("youtube");
    Bundle bundle = new Bundle();
    bundle.putStringArrayList("Product",product);
    ft.commit();

I got error on bundle.putStringArrayList("Product",product); , how can I do to resolve this question ? 

A:

First make InfoProduct Parceble
Check this- Link 
Then use     `
bundle.putParcelableArrayList(product)

You can get arraylist by     `
getParcelableArrayList(..)

Also check this

