I have 2 activities: List Item and Detail item.
- List item using Paging 3 to display list item. When click an item it direct to Detail item in other activity.
- Detail item using ViewPager to view detail and it can swipe left/right to view next/pre item(item list same with the list in item view).
The problem is:
- When start to view detail, we send a list item (loaded item page) Ex: 30 item ~ 3 page. But, when swipe to the end list that sent from list, I need load next page to continue display detail. and when back from that next page (ex: item 35 - page 4) to the list item, I have to scroll to the target item (item 35).
Please help me to handle load next page (page 4) and scroll the list to the target item (item 35). I know paging 3 adapter using LiveData so it could not trigger load next page if the list item in the background.
Thanks for any help!