I'm student and developing online food booking app . I'm getting food list from api and displaying in list.On + button I'm able to add item in cart but I want on cart image click , I move on new activity and there I want to get all added items list and display in list view.1) 1st code snippet it my adapter class where I have + button to increase the item count .2) 2nd Code is my model class 3) 3rd code snippet is my fragment code where on button click i want to move on order class.
I advance thanks.Please help me.
static ArrayList<AddedPizzaInfo> bookmarker_array = new ArrayList<AddedPizzaInfo>();
holder.increase.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
count++;
holder.integer_number.setText(String.valueOf(count));
total_value = holder.integer_number.getText().toString();if(actionListener!=null)actionListener.onItemTap(holder.itemCopyIV);
AddedPizzaInfo bookmarkerPojo = new AddedPizzaInfo();
bookmarkerPojo.SetName(c.getName());
bookmarker_array.add( bookmarkerPojo);// adding item but
=======
public class AddedPizzaInfo {
private String name = "";
public AddedPizzaInfo() {}
public AddedPizzaInfo( String name) {
this.name = name;
}
public void SetName(String name){this.name = name;}
public String GetName(String name){
return this.name;
}
}
====textCartItemCount.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent startSecondActivityIntent = new Intent(Veg_Pizza_Activity.this, Order_Summary.class);
startSecondActivityIntent.putExtra("items", Parcels.wrap(bookmarker_array));
startActivity(startSecondActivityIntent);
(Veg_Pizza_Activity.this).overridePendingTransition(0, 0);
}
});