I have a ViewPager with a SlidingTabLayout class and a SlidingTabStrip class. The FragmentPagerAdapter uses by this ViewPager allow to show 367 entries (actually I want to show a Calendar). My SlidingTabLayout is not scralable; I added these modifications for that:
@Override
public boolean onTouchEvent(MotionEvent ev) {
switch (ev.getAction()) {
case MotionEvent.ACTION_DOWN:
// if we can scroll pass the event to the superclass
if (mScrollable) return super.onTouchEvent(ev);
// only continue to handle the touch event if scrolling enabled
return mScrollable; // mScrollable is always false at this point
default:
return super.onTouchEvent(ev);
}
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
// Don't do anything with intercepted touch events if
// we are not scrollable
if (!mScrollable) return false;
else return super.onInterceptTouchEvent(ev);
}
And now, I want to show just 3 categories in Sliding Tab Strip at each time, like this example:
How can I do that please ?
I achieved this result with
Hopefully this helps.