0

I have an activity, I have 2 fragments (FragmentA & FragmentB) within that activity. I can switch from FragmentA to FragmentB or vice-versa using the menu items. In the FragmentA I have fetched all the .pdf files within my device & displayed them using recyclerView. Each item of recyclerView has a checkBox & .pdf file name.

I want to select needed items from that recyclerView using checkBox, and pass all those items to the other recyclerView which is in FragmentB on a button click which I have already included in FragmentA as shown in image

Image of FragmentA

When I press 'Done' button from FragmentA, all the selected items from FragmentA should get passed to recyclerView of FragmentB and I should be able to view those .pdf files from FragmentB.

In the FragmentB, the single item of the recyclerView containes only a textView, which would be the name of the .pdf file.

Once I close my application and open it again, the only items of recyclerView of FragmentA which I selected before should be hidden but those selected items should be visible in recyclerView of FragmentB, and I should be able to view those .pdf files from FragmentB.

Plz help me how this needs to be done, what all the things I need to consider. (ex: sharedPreferences, intents, SQLite....)

Thanks in advance :)

Sujeet
  • 1
  • 2

0 Answers0