I am trying to pass arraylist from activity to fragments but i am getting a null value using the parceable.
In Main Activity:
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("cbookings", customerbooking);
Todaybooking tb = new Todaybooking();
tb.setArguments(bundle);
Array list data declarations
ArrayList<Cbooking> customerbooking = new ArrayList<>();
In fragments:
ArrayList<Cbooking> customerbooking = new ArrayList<>();
Bundle extras = getActivity().getIntent().getExtras();
customerbooking = extras.getParcelableArrayList("cbookings");
Log.wtf("test", customerbooking.toString());