1

Is it possible to have a ViewPager (which pages between fragments) within another fragment?

To answer my own question some have found "hacky" solutions with a degree of success: Display fragment viewpager within a fragment, and there have been semi "official" answers that fragments within fragments are not supported. Both of these questions were asked a year or so ago, so I was hoping support for fragments within fragments may have progressed somewhat. Is this the case?

Thanks

Community
  • 1
  • 1
Michael J
  • 825
  • 1
  • 9
  • 18

1 Answers1

1

Since ViewPager extends ViewGroup, so yes you can.

and you can embed Fragments into Fragment

Mohammad Ersan
  • 12,304
  • 8
  • 54
  • 77
  • You can but it's not simple, see my post about it: http://stackoverflow.com/questions/6221763/android-can-you-nest-fragments/9700314#9700314 – Chris.Jenkins Jul 17 '12 at 08:20