1

I am using Fragment tab ViewPager in my application. In every page of my ViewPager, I have a Fragment which contains a ListView. Now what I want to do is to hide/unhide Tabs on ListView Scroll depending upon direction of scroll. So is there any way to do it?

atlasologist
  • 3,824
  • 1
  • 21
  • 35
Mukesh Rana
  • 4,051
  • 3
  • 27
  • 39
  • Have you checked out the `ListView` API docs? – Sufian May 23 '14 at 13:51
  • @Sufian what should i check? ListView and Fragment tab ViewPager are two different things. – Mukesh Rana May 23 '14 at 13:54
  • Your question consists of 2 parts. 1) "hide/unhide `Tab`s". 2) "depending upon direction of scroll". Are you asking about both issues? – Sufian May 23 '14 at 14:00
  • 1
    No I know how to find direction of scroll. All I want to do is to hide tab s while scrolling down and unhide while scrolling up. – Mukesh Rana May 23 '14 at 14:02
  • Can you explain what you mean by Fragment tab Viewpager? If it's a library, please update the post with the link. – Sufian May 24 '14 at 16:13
  • If you want to remove a `Fragment` from a `ViewPager` then use `removeView()`. – Sufian May 24 '14 at 16:22
  • 1
    No it is not a library. It is a normal TabHost whose TabContent is a ViewPager and in each page of my ViewPager, there is a Fragment. – Mukesh Rana May 26 '14 at 05:19
  • 1
    You most likely are looking for [CoordinatorLayout using the ViewPager's RecyclerView](http://stackoverflow.com/questions/30540632/coordinatorlayout-using-the-viewpagers-recyclerview). Support library has made this "stick tabs to the top" easier after you scroll. This works with `RecyclerView` only. If you want to have this with `ListView`, you will probably need to look for libraries and I guess there are some. – Sufian Jan 10 '16 at 10:35

0 Answers0