Using swipe in FragmentTabHost

546 Views Asked by At

I have implemented FragmentTabHost in my app and I wanted to use basic Swipe option for the app to make it look interactive. And I have no idea about that implementation.

1

There are 1 best solutions below

9
On BEST ANSWER
  1. Use ViewPager inside your FragmentTabHost
  2. Set an adapter to your created ViewPager defined at inner FragmentTabHost.
  3. Add setOnPageChangeListener into ViewPager that can change fragment on onPageSelected() at every swipe .

You can go through this complete example.