| 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.

参数

  context | the context
  attrs | the attrs

## 成员函数说明

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

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

参数

  tabText | the tab text
  fragment | the fragment

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

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

参数

  tabText | the tab text
  fragment | the fragment
  drawableNormal | the drawable normal
  drawablePressed | the drawable pressed

void com.ab.view.sliding.AbBottomTabView.addItemViews | ( | List< String > | tabTexts,
|  | List< Fragment > | fragments
| ) |  |
| inline

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

参数

  tabTexts | the tab texts
  fragments | the fragments

void com.ab.view.sliding.AbBottomTabView.addItemViews | ( | List< String > | tabTexts,
|  | List< Fragment > | fragments,
|  | List< Drawable > | drawables
| ) |  |
| inline

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

参数

  tabTexts | the tab texts
  fragments | the fragments
  drawables | the drawables

void com.ab.view.sliding.AbBottomTabView.addTab | ( | String | text,
|  | int | index
| ) |  |
| inline private

描述：创造一个Tab.

参数

  text | the text
  index | the index

void com.ab.view.sliding.AbBottomTabView.addTab | ( | String | text,
|  | int | index,
|  | Drawable | top
| ) |  |
| inline private

描述：创造一个Tab.

参数

  text | the text
  index | the index
  top | the 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

描述：删除某一个.

参数

  index | the index

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

描述：设置显示哪一个.

参数

  index | the new current item

void com.ab.view.sliding.AbBottomTabView.setOnPageChangeListener | ( | ViewPager.OnPageChangeListener | listener | ) |
| inline

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

参数

  listener | the new on page change listener

void com.ab.view.sliding.AbBottomTabView.setTabBackgroundResource | ( | int | resid | ) |
| inline

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

参数

  resid | the new tab background resource

void com.ab.view.sliding.AbBottomTabView.setTabLayoutBackgroundResource | ( | int | resid | ) |
| inline

描述：设置Tab的背景.

参数

  resid | the new tab layout background resource

void com.ab.view.sliding.AbBottomTabView.setTabPadding | ( | int | left,
|  | int | top,
|  | int | right,
|  | int | bottom
| ) |  |
| inline

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

参数

  left | the left
  top | the top
  right | the right
  bottom | the bottom

void com.ab.view.sliding.AbBottomTabView.setTabSelectColor | ( | int | tabColor | ) |
| inline

描述：设置选中的颜色.

参数

  tabColor | the new tab select color

void com.ab.view.sliding.AbBottomTabView.setTabTextColor | ( | int | tabColor | ) |
| inline

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

参数

  tabColor | the new tab text color

void com.ab.view.sliding.AbBottomTabView.setTabTextSize | ( | int | tabTextSize | ) |
| inline

Sets the tab text size.

参数

  tabTextSize | the 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的文字大小.

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

- src/com/ab/view/sliding/AbBottomTabView.java