I have six different activities each displaying a group of 10-20 pictures in ImageView. If wanted to enable swiping for each of the activity, will I need to create the Pager Adapter and View Pager for each of the 6 activities? Or can I create only one Pager Adapter and one View Pager that will be shared by all the six activities? How do I do that?
No, you can't share a GUI element between activities. But if all the activities have the same layout, you can refactor the common parts of all (including the GUI) into a base class, and then have all the activity classes extend that. That way you need to write the code handling the GUI only once, not six times.
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!