public class TabIndicatorView extends RecyclerView implements ThemeManager.OnThemeChangedListener
| Modifier and Type | Class and Description |
|---|---|
static class |
TabIndicatorView.TabIndicatorFactory |
static class |
TabIndicatorView.ViewPagerIndicatorFactory |
| Modifier and Type | Field and Description |
|---|---|
protected int |
mCurrentStyle |
static int |
MODE_FIXED |
static int |
MODE_SCROLL |
protected int |
mStyleId |
static int |
SCROLL_STATE_DRAGGING |
static int |
SCROLL_STATE_IDLE |
static int |
SCROLL_STATE_SETTLING |
| Constructor and Description |
|---|
TabIndicatorView(android.content.Context context) |
TabIndicatorView(android.content.Context context,
android.util.AttributeSet attrs) |
TabIndicatorView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyStyle(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes) |
void |
applyStyle(int resId) |
void |
draw(android.graphics.Canvas canvas) |
protected void |
init(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes) |
void |
onAttachedToWindow() |
void |
onDetachedFromWindow() |
protected void |
onMeasure(int widthSpec,
int heightSpec) |
void |
onRtlPropertiesChanged(int layoutDirection) |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh) |
protected void |
onTabScrolled(int position,
float positionOffset) |
protected void |
onTabScrollStateChanged(int state) |
protected void |
onTabSelected(int position) |
void |
onThemeChanged(ThemeManager.OnThemeChangedEvent event) |
void |
setCurrentTab(int position)
Set the current tab of this TabIndicatorView.
|
void |
setTabIndicatorFactory(TabIndicatorView.TabIndicatorFactory factory) |
protected int mStyleId
protected int mCurrentStyle
public static final int MODE_SCROLL
public static final int MODE_FIXED
public static final int SCROLL_STATE_IDLE
public static final int SCROLL_STATE_DRAGGING
public static final int SCROLL_STATE_SETTLING
public TabIndicatorView(android.content.Context context)
public TabIndicatorView(android.content.Context context,
android.util.AttributeSet attrs)
public TabIndicatorView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
protected void init(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
public void applyStyle(int resId)
protected void applyStyle(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
public void setTabIndicatorFactory(TabIndicatorView.TabIndicatorFactory factory)
public void setCurrentTab(int position)
position - The position of current tab.public void onThemeChanged(ThemeManager.OnThemeChangedEvent event)
onThemeChanged in interface ThemeManager.OnThemeChangedListenerpublic void onAttachedToWindow()
public void onDetachedFromWindow()
public void onRtlPropertiesChanged(int layoutDirection)
protected void onMeasure(int widthSpec,
int heightSpec)
protected void onSizeChanged(int w,
int h,
int oldw,
int oldh)
public void draw(android.graphics.Canvas canvas)
protected void onTabScrollStateChanged(int state)
protected void onTabScrolled(int position,
float positionOffset)
protected void onTabSelected(int position)