I'm trying to make a cart like in grofers.
Expected: When I add items to cart by clicking on add button, go to other page and come back. The items which are in cart should have the quantity selected and other items should have add button with them.
Actual: When I add items to cart by clicking on add button, go to other page and come back.
- All items have the add button whether they are in cart or aren't in cart
- On pressing add button under one of the item, all items in the cart get's the quantity(something that should have happened at the load of the page is happening now on clicking)
Problem:
- Items aren't updating in RecyclerView when fragment opens
- Nested RecyclerView not working on fragment open
Can someone help to solve this please? Thankyou