AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
| Public 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
com.ab.view.sliding.AbBottomTabView类 参考
类 com.ab.view.sliding.AbBottomTabView 继承关系图:

class  MyOnPageChangeListener
 

Public 成员函数

 AbBottomTabView (Context context, AttributeSet attrs)
 
void setCurrentItem (int index)
 
void setOnPageChangeListener (ViewPager.OnPageChangeListener listener)
 
void onMeasure (int widthMeasureSpec, int heightMeasureSpec)
 
void setTabBackgroundResource (int resid)
 
void setTabLayoutBackgroundResource (int resid)
 
int getTabTextSize ()
 
void setTabTextSize (int tabTextSize)
 
void setTabTextColor (int tabColor)
 
void setTabSelectColor (int tabColor)
 
void notifyTabDataSetChanged ()
 
void addItemViews (List< String > tabTexts, List< Fragment > fragments)
 
void addItemViews (List< String > tabTexts, List< Fragment > fragments, List< Drawable > drawables)
 
void addItemView (String tabText, Fragment fragment)
 
void addItemView (String tabText, Fragment fragment, Drawable drawableNormal, Drawable drawablePressed)
 
void removeItemView (int index)
 
void removeAllItemViews ()
 
ViewPager getViewPager ()
 
void setTabPadding (int left, int top, int right, int bottom)
 

Private 成员函数

void addTab (String text, int index)
 
void addTab (String text, int index, Drawable top)
 

Private 属性

Context context
 
LinearLayout mTabLayout = null
 
ViewPager mViewPager
 
ViewPager.OnPageChangeListener mListener
 
ArrayList< TextView > tabItemList = null
 
ArrayList< Fragment > pagerItemList = null
 
List< String > tabItemTextList = null
 
List< Drawable > tabItemDrawableList = null
 
int mSelectedTabIndex = 0
 
AbFragmentPagerAdapter mFragmentPagerAdapter = null
 
int tabBackgroundResource = -1
 
int tabTextSize = 30
 
int tabTextColor = Color.BLACK
 
int tabSelectColor = Color.WHITE
 
OnClickListener mTabClickListener
 

详细描述

© 2012 amsoft.cn 名称:AbSlidingTabView.java 描述:滑动的tab.

作者
还如一梦中
版本
v1.0
日期
:2013-05-17 下午6:46:29

构造及析构函数说明

com.ab.view.sliding.AbBottomTabView.AbBottomTabView ( Context  context,
AttributeSet  attrs 
)
inline

Instantiates a new ab bottom tab view.

参数
contextthe context
attrsthe attrs

成员函数说明

void com.ab.view.sliding.AbBottomTabView.addItemView ( String  tabText,
Fragment  fragment 
)
inline

描述:增加一个内容与tab.

参数
tabTextthe tab text
fragmentthe fragment
void com.ab.view.sliding.AbBottomTabView.addItemView ( String  tabText,
Fragment  fragment,
Drawable  drawableNormal,
Drawable  drawablePressed 
)
inline

描述:增加一个内容与tab.

参数
tabTextthe tab text
fragmentthe fragment
drawableNormalthe drawable normal
drawablePressedthe drawable pressed
void com.ab.view.sliding.AbBottomTabView.addItemViews ( List< String >  tabTexts,
List< Fragment >  fragments 
)
inline

描述:增加一组内容与tab.

参数
tabTextsthe tab texts
fragmentsthe fragments
void com.ab.view.sliding.AbBottomTabView.addItemViews ( List< String >  tabTexts,
List< Fragment >  fragments,
List< Drawable >  drawables 
)
inline

描述:增加一组内容与tab附带顶部图片.

参数
tabTextsthe tab texts
fragmentsthe fragments
drawablesthe drawables
void com.ab.view.sliding.AbBottomTabView.addTab ( String  text,
int  index 
)
inlineprivate

描述:创造一个Tab.

参数
textthe text
indexthe index
void com.ab.view.sliding.AbBottomTabView.addTab ( String  text,
int  index,
Drawable  top 
)
inlineprivate

描述:创造一个Tab.

参数
textthe text
indexthe index
topthe top
int com.ab.view.sliding.AbBottomTabView.getTabTextSize ( )
inline

Gets the tab text size.

返回
the tab text size
ViewPager com.ab.view.sliding.AbBottomTabView.getViewPager ( )
inline

描述:获取这个View的ViewPager.

返回
the view pager
void com.ab.view.sliding.AbBottomTabView.notifyTabDataSetChanged ( )
inline

描述:tab有变化刷新.

void com.ab.view.sliding.AbBottomTabView.onMeasure ( int  widthMeasureSpec,
int  heightMeasureSpec 
)
inline
void com.ab.view.sliding.AbBottomTabView.removeAllItemViews ( )
inline

描述:删除所有.

void com.ab.view.sliding.AbBottomTabView.removeItemView ( int  index)
inline

描述:删除某一个.

参数
indexthe index
void com.ab.view.sliding.AbBottomTabView.setCurrentItem ( int  index)
inline

描述:设置显示哪一个.

参数
indexthe new current item
void com.ab.view.sliding.AbBottomTabView.setOnPageChangeListener ( ViewPager.OnPageChangeListener  listener)
inline

描述:设置一个外部的监听器.

参数
listenerthe new on page change listener
void com.ab.view.sliding.AbBottomTabView.setTabBackgroundResource ( int  resid)
inline

描述:设置单个tab的背景选择器.

参数
residthe new tab background resource
void com.ab.view.sliding.AbBottomTabView.setTabLayoutBackgroundResource ( int  resid)
inline

描述:设置Tab的背景.

参数
residthe new tab layout background resource
void com.ab.view.sliding.AbBottomTabView.setTabPadding ( int  left,
int  top,
int  right,
int  bottom 
)
inline

描述:设置每个tab的边距.

参数
leftthe left
topthe top
rightthe right
bottomthe bottom
void com.ab.view.sliding.AbBottomTabView.setTabSelectColor ( int  tabColor)
inline

描述:设置选中的颜色.

参数
tabColorthe new tab select color
void com.ab.view.sliding.AbBottomTabView.setTabTextColor ( int  tabColor)
inline

描述:设置tab文字的颜色.

参数
tabColorthe new tab text color
void com.ab.view.sliding.AbBottomTabView.setTabTextSize ( int  tabTextSize)
inline

Sets the tab text size.

参数
tabTextSizethe new tab text size

类成员变量说明

Context com.ab.view.sliding.AbBottomTabView.context
private

The context.

AbFragmentPagerAdapter com.ab.view.sliding.AbBottomTabView.mFragmentPagerAdapter = null
private

内容区域的适配器.

ViewPager.OnPageChangeListener com.ab.view.sliding.AbBottomTabView.mListener
private

The m listener.

int com.ab.view.sliding.AbBottomTabView.mSelectedTabIndex = 0
private

当前选中编号.

OnClickListener com.ab.view.sliding.AbBottomTabView.mTabClickListener
private
初始值:
= new OnClickListener() {
public void onClick(View view) {
AbTabItemView tabView = (AbTabItemView)view;
setCurrentItem(tabView.getIndex());
}
}

The m tab click listener.

LinearLayout com.ab.view.sliding.AbBottomTabView.mTabLayout = null
private

tab的线性布局.

ViewPager com.ab.view.sliding.AbBottomTabView.mViewPager
private

The m view pager.

ArrayList<Fragment> com.ab.view.sliding.AbBottomTabView.pagerItemList = null
private

内容的View.

int com.ab.view.sliding.AbBottomTabView.tabBackgroundResource = -1
private

tab的背景.

List<Drawable> com.ab.view.sliding.AbBottomTabView.tabItemDrawableList = null
private

tab的图标.

ArrayList<TextView> com.ab.view.sliding.AbBottomTabView.tabItemList = null
private

tab的列表.

List<String> com.ab.view.sliding.AbBottomTabView.tabItemTextList = null
private

tab的文字.

int com.ab.view.sliding.AbBottomTabView.tabSelectColor = Color.WHITE
private

tab的选中文字颜色.

int com.ab.view.sliding.AbBottomTabView.tabTextColor = Color.BLACK
private

tab的文字颜色.

int com.ab.view.sliding.AbBottomTabView.tabTextSize = 30
private

tab的文字大小.


该类的文档由以下文件生成: