Could you? Probably. Depends on your data structure and how you're populating the content. However, I don't believe it's the right approach, based on what you've shown. Rather, it looks like what you are really looking for is a single Activity
that hosts a ViewPager
, with a FragmentPagerAdapter
. You would have a single "PageFragment", which you could instantiate with the index as an argument, and then populate the contents of the Fragment
based on that index.
See: ViewPager
See: FragmentPagerAdapter