public class FunTabLayout
extends RecyclerView
| Modifier and Type | Class and Description |
|---|---|
class |
FunTabLayout.IndicatorDecoration |
protected static class |
FunTabLayout.RecyclerOnScrollListener |
| Modifier and Type | Field and Description |
|---|---|
protected static float |
DEFAULT_POSITION_THRESHOLD |
protected static long |
DEFAULT_SCROLL_DURATION |
protected com.tompee.funtablayout.BaseAdapter<?> |
mAdapter |
protected int |
mIndicatorOffset |
protected Paint |
mIndicatorPaint |
protected int |
mIndicatorPosition |
protected LinearLayoutManager |
mLinearLayoutManager |
protected float |
mOldPositionOffset |
protected float |
mPositionThreshold |
protected FunTabLayout.RecyclerOnScrollListener |
mRecyclerOnScrollListener |
protected boolean |
mRequestScrollToTab |
protected boolean |
mScrollEanbled |
protected int |
mScrollOffset |
protected float |
mTabPositionOffset |
protected int |
mTabVisibleCount |
protected ViewPager |
mViewPager |
protected static float |
POSITION_THRESHOLD_ALLOWABLE |
| Constructor and Description |
|---|
FunTabLayout(Context context) |
FunTabLayout(Context context,
AttributeSet attrs) |
FunTabLayout(Context context,
AttributeSet attrs,
int defStyle) |
| Modifier and Type | Method and Description |
|---|---|
void |
childDrawableStateChanged(View child) |
protected boolean |
isLayoutRtl() |
protected void |
onDetachedFromWindow() |
protected void |
scrollToTab(int position) |
protected void |
scrollToTab(int position,
float positionOffset,
boolean fitIndicator) |
void |
setCurrentItem(int position,
boolean smoothScroll) |
void |
setPositionThreshold(float threshold)
Sets the position threshold on when to switch tabs
|
void |
setTabVisibleCount(int count)
Sets the maximum number of visible tab
|
void |
setUpWithAdapter(com.tompee.funtablayout.BaseAdapter<?> adapter) |
protected void |
startAnimation(int position) |
protected void |
updateCurrentIndicatorPosition(int position,
float dx,
float positionOffset) |
protected static final long DEFAULT_SCROLL_DURATION
protected static final float DEFAULT_POSITION_THRESHOLD
protected static final float POSITION_THRESHOLD_ALLOWABLE
protected final Paint mIndicatorPaint
protected final LinearLayoutManager mLinearLayoutManager
protected int mTabVisibleCount
protected FunTabLayout.RecyclerOnScrollListener mRecyclerOnScrollListener
protected ViewPager mViewPager
protected com.tompee.funtablayout.BaseAdapter<?> mAdapter
protected int mIndicatorPosition
protected int mIndicatorOffset
protected int mScrollOffset
protected float mOldPositionOffset
protected float mPositionThreshold
protected boolean mRequestScrollToTab
protected boolean mScrollEanbled
protected float mTabPositionOffset
public FunTabLayout(Context context)
public FunTabLayout(Context context,
AttributeSet attrs)
public FunTabLayout(Context context,
AttributeSet attrs,
int defStyle)
protected void onDetachedFromWindow()
public void setTabVisibleCount(int count)
count - The new visible tab countpublic void setPositionThreshold(float threshold)
threshold - New position thresholdpublic void setUpWithAdapter(com.tompee.funtablayout.BaseAdapter<?> adapter)
public void setCurrentItem(int position,
boolean smoothScroll)
public void childDrawableStateChanged(View child)
protected void startAnimation(int position)
protected void scrollToTab(int position)
protected void scrollToTab(int position,
float positionOffset,
boolean fitIndicator)
protected void updateCurrentIndicatorPosition(int position,
float dx,
float positionOffset)
protected boolean isLayoutRtl()