-2

I have multiple fragments in an activity. How do i load the next fragment when i slide from right to left? I have made the fragment classes and also designed their layouts. I have a main activity from which after login the user reaches next activity. This activity has multiple fragments. The first fragment is launched automatically but next fragments will be launched when user slides the screen from right to left.

Abhilash
  • 77
  • 1
  • 8
  • 4
    Possible duplicate of [How to implement a ViewPager with different Fragments / Layouts](http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-different-fragments-layouts) – SaravInfern Jul 11 '16 at 08:37
  • Duplicate. But if you awnt to dinamycally create new fragments, override the adapters getItem and getcount. Make sure to keep references of each. – VikingPingvin Jul 11 '16 at 08:41

1 Answers1

0

You can use ViewPager to display fragments on swipe.

For Reference How to implement a ViewPager with different Fragments / Layouts

Community
  • 1
  • 1
Nitesh
  • 3,868
  • 1
  • 20
  • 26