I don't know how to pass data between my fragments "books" and "reservedBooks" in a viewPager which is an object of my class "bookCard" and part of my recyclerView to add it to the other recyclerView in my fragment "reservedBooks" throught the click of a button "reserve" that is part of each member of the recyclerView
CodePudding user response:
You need a static place for storing data for any type of your data(books and reversedbook) you can use static array or database android Then every time that you select an item , this item must remove from books in that staic array and add to another static array for reversedbook, And every time that you replace fragment in view pager, you must update recyclerview by notifydatachanged()
