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

Public 成员函数

 AbTitleBar (Context context, AttributeSet attrs)
 
 AbTitleBar (Context context)
 
void ininTitleBar (Context context)
 
void setTitleBarBackground (int res)
 
void setTitleBarBackgroundDrawable (Drawable d)
 
void setTitleBarBackgroundColor (int color)
 
void setTitleTextMargin (int left, int top, int right, int bottom)
 
void setTitleTextSize (int titleTextSize)
 
void setTitleBarGravity (int gravity1, int gravity2)
 
Button getTitleTextButton ()
 
Button getTitleSmallTextButton ()
 
ImageView getLogoView ()
 
ImageView getLogoView2 ()
 
void setTitleTextBold (boolean bold)
 
void setTitleTextBackgroundResource (int resId)
 
void setTitleTextBackgroundDrawable (Drawable drawable)
 
void setTitleText (String text)
 
void setTitleText (int resId)
 
void setTitleSmallText (String text)
 
void setTitleSmallText (int resId)
 
void setLogo (Drawable drawable)
 
void setLogo (int resId)
 
void setLogo2 (Drawable drawable)
 
void setLogo2 (int resId)
 
void setLogoLine (int resId)
 
void setLogoLine (Drawable drawable)
 
void addRightView (View rightView)
 
void addRightView (int resId)
 
void clearRightView ()
 
LinearLayout getRightLayout ()
 
void setLogoOnClickListener (View.OnClickListener mOnClickListener)
 
void setLogo2OnClickListener (View.OnClickListener mOnClickListener)
 
void setTitleTextOnClickListener (View.OnClickListener mOnClickListener)
 
void showWindow (View parent, View view, boolean offsetMode)
 
void hideWindow ()
 
void setTitleTextDropDown (final View view)
 
LinearLayout getTitleTextLayout ()
 
void setChildViewFillParent (boolean left)
 

Public 属性

int mAbTitleBarID = 1
 
LayoutInflater mInflater
 
LinearLayout.LayoutParams layoutParamsFF = null
 
LinearLayout.LayoutParams layoutParamsFW = null
 
LinearLayout.LayoutParams layoutParamsWF = null
 
LinearLayout.LayoutParams layoutParamsWW = null
 

Protected 属性

LinearLayout titleTextLayout = null
 
Button titleTextBtn = null
 
Button titleSmallTextBtn = null
 
ImageView logoView = null
 
ImageView logoView2 = null
 
ImageView logoLineView = null
 
LinearLayout rightLayout = null
 

Private 属性

Activity mActivity
 
LinearLayout.LayoutParams titleTextLayoutParams = null
 
LinearLayout.LayoutParams rightViewLayoutParams = null
 
PopupWindow popupWindow
 

详细描述

© 2012 amsoft.cn 名称:AbBottomBar.java 描述:标题栏实现.

作者
还如一梦中
版本
v1.0
日期
:2013-04-24 下午3:46:47

构造及析构函数说明

com.ab.view.titlebar.AbTitleBar.AbTitleBar ( Context  context,
AttributeSet  attrs 
)
inline

Instantiates a new ab title bar.

参数
contextthe context
attrsthe attrs
com.ab.view.titlebar.AbTitleBar.AbTitleBar ( Context  context)
inline

Instantiates a new ab title bar.

参数
contextthe context

成员函数说明

void com.ab.view.titlebar.AbTitleBar.addRightView ( View  rightView)
inline

描述:把指定的View填加到标题栏右边.

参数
rightView指定的View
void com.ab.view.titlebar.AbTitleBar.addRightView ( int  resId)
inline

描述:把指定资源ID表示的View填加到标题栏右边.

参数
resId指定的View的资源ID
void com.ab.view.titlebar.AbTitleBar.clearRightView ( )
inline

描述:清除标题栏右边的View.

ImageView com.ab.view.titlebar.AbTitleBar.getLogoView ( )
inline

描述:获取标题Logo的View.

返回
the logo view
ImageView com.ab.view.titlebar.AbTitleBar.getLogoView2 ( )
inline

描述:获取标题Logo的View.

返回
the logo view
LinearLayout com.ab.view.titlebar.AbTitleBar.getRightLayout ( )
inline

获取这个右边的布局,可用来设置位置.

返回
the right layout
Button com.ab.view.titlebar.AbTitleBar.getTitleSmallTextButton ( )
inline

描述:获取小标题文本的Button.

返回
the title Button view
Button com.ab.view.titlebar.AbTitleBar.getTitleTextButton ( )
inline

描述:获取标题文本的Button.

返回
the title Button view
LinearLayout com.ab.view.titlebar.AbTitleBar.getTitleTextLayout ( )
inline

获取标题的全体布局.

返回
the title text layout
void com.ab.view.titlebar.AbTitleBar.hideWindow ( )
inline

描述:隐藏Window.

void com.ab.view.titlebar.AbTitleBar.ininTitleBar ( Context  context)
inline

Inin title bar.

参数
contextthe context
void com.ab.view.titlebar.AbTitleBar.setChildViewFillParent ( boolean  left)
inline

获取子布局显示宽度比例 默认为标题填充,右边靠右.

参数
leftthe new child view fill parent
void com.ab.view.titlebar.AbTitleBar.setLogo ( Drawable  drawable)
inline

描述:设置Logo的背景图.

参数
drawableLogo资源Drawable
void com.ab.view.titlebar.AbTitleBar.setLogo ( int  resId)
inline

描述:设置Logo的背景资源.

参数
resIdLogo资源ID
void com.ab.view.titlebar.AbTitleBar.setLogo2 ( Drawable  drawable)
inline

描述:设置Logo的背景图.

参数
drawableLogo资源Drawable
void com.ab.view.titlebar.AbTitleBar.setLogo2 ( int  resId)
inline

描述:设置Logo的背景资源.

参数
resIdLogo资源ID
void com.ab.view.titlebar.AbTitleBar.setLogo2OnClickListener ( View.OnClickListener  mOnClickListener)
inline

描述:设置Logo按钮的点击事件.

参数
mOnClickListener指定的返回事件
void com.ab.view.titlebar.AbTitleBar.setLogoLine ( int  resId)
inline

描述:设置Logo分隔线的背景资源.

参数
resIdLogo资源ID
void com.ab.view.titlebar.AbTitleBar.setLogoLine ( Drawable  drawable)
inline

描述:设置Logo分隔线的背景图.

参数
drawableLogo资源Drawable
void com.ab.view.titlebar.AbTitleBar.setLogoOnClickListener ( View.OnClickListener  mOnClickListener)
inline

描述:设置Logo按钮的点击事件.

参数
mOnClickListener指定的返回事件
void com.ab.view.titlebar.AbTitleBar.setTitleBarBackground ( int  res)
inline

描述:标题栏的背景图.

参数
res背景图资源ID
void com.ab.view.titlebar.AbTitleBar.setTitleBarBackgroundColor ( int  color)
inline

描述:标题栏的背景图.

参数
color背景颜色值
void com.ab.view.titlebar.AbTitleBar.setTitleBarBackgroundDrawable ( Drawable  d)
inline

描述:设置标题背景.

参数
d背景图
void com.ab.view.titlebar.AbTitleBar.setTitleBarGravity ( int  gravity1,
int  gravity2 
)
inline

描述:设置标题文字对齐方式 根据右边的具体情况判定方向: (1)中间靠近 Gravity.CENTER,Gravity.CENTER (2)左边居左 右边居右Gravity.LEFT,Gravity.RIGHT (3)左边居中,右边居右Gravity.CENTER,Gravity.RIGHT (4)左边居右,右边居右Gravity.RIGHT,Gravity.RIGHT 必须在addRightView(view)方法后设置

参数
gravity1标题对齐方式
gravity2右边布局对齐方式
void com.ab.view.titlebar.AbTitleBar.setTitleSmallText ( String  text)
inline

描述:设置小标题文本.

参数
text文本
void com.ab.view.titlebar.AbTitleBar.setTitleSmallText ( int  resId)
inline

描述:设置标题文本.

参数
resId文本的资源ID
void com.ab.view.titlebar.AbTitleBar.setTitleText ( String  text)
inline

描述:设置标题文本.

参数
text文本
void com.ab.view.titlebar.AbTitleBar.setTitleText ( int  resId)
inline

描述:设置标题文本.

参数
resId文本的资源ID
void com.ab.view.titlebar.AbTitleBar.setTitleTextBackgroundDrawable ( Drawable  drawable)
inline

描述:设置标题背景.

参数
drawablethe new title text background drawable
void com.ab.view.titlebar.AbTitleBar.setTitleTextBackgroundResource ( int  resId)
inline

描述:设置标题背景.

参数
resIdthe new title text background resource
void com.ab.view.titlebar.AbTitleBar.setTitleTextBold ( boolean  bold)
inline

描述:设置标题字体粗体.

参数
boldthe new title text bold
void com.ab.view.titlebar.AbTitleBar.setTitleTextDropDown ( final View  view)
inline

描述:设置标题下拉的View.

参数
viewthe new title text drop down
void com.ab.view.titlebar.AbTitleBar.setTitleTextMargin ( int  left,
int  top,
int  right,
int  bottom 
)
inline

描述:标题文字的对齐,需要在setTitleBarGravity之后设置才生效.

参数
leftthe left
topthe top
rightthe right
bottomthe bottom
void com.ab.view.titlebar.AbTitleBar.setTitleTextOnClickListener ( View.OnClickListener  mOnClickListener)
inline

描述:设置标题的点击事件.

参数
mOnClickListener指定的返回事件
void com.ab.view.titlebar.AbTitleBar.setTitleTextSize ( int  titleTextSize)
inline

描述:标题文字字号.

参数
titleTextSize文字字号
void com.ab.view.titlebar.AbTitleBar.showWindow ( View  parent,
View  view,
boolean  offsetMode 
)
inline

描述:下拉菜单的的实现方法.

参数
parentthe parent
view要显示的View
offsetMode不填满的模式

类成员变量说明

LinearLayout.LayoutParams com.ab.view.titlebar.AbTitleBar.layoutParamsFF = null

LinearLayout.LayoutParams,已经初始化为FILL_PARENT, FILL_PARENT

LinearLayout.LayoutParams com.ab.view.titlebar.AbTitleBar.layoutParamsFW = null

LinearLayout.LayoutParams,已经初始化为FILL_PARENT, WRAP_CONTENT

LinearLayout.LayoutParams com.ab.view.titlebar.AbTitleBar.layoutParamsWF = null

LinearLayout.LayoutParams,已经初始化为WRAP_CONTENT, FILL_PARENT

LinearLayout.LayoutParams com.ab.view.titlebar.AbTitleBar.layoutParamsWW = null

LinearLayout.LayoutParams,已经初始化为WRAP_CONTENT, WRAP_CONTENT

ImageView com.ab.view.titlebar.AbTitleBar.logoLineView = null
protected

左侧的Logo图标右边的分割线View.

ImageView com.ab.view.titlebar.AbTitleBar.logoView = null
protected

左侧的Logo图标View.

ImageView com.ab.view.titlebar.AbTitleBar.logoView2 = null
protected

左侧的Logo图标View.

int com.ab.view.titlebar.AbTitleBar.mAbTitleBarID = 1

标题栏布局ID.

Activity com.ab.view.titlebar.AbTitleBar.mActivity
private

The m context.

LayoutInflater com.ab.view.titlebar.AbTitleBar.mInflater

全局的LayoutInflater对象,已经完成初始化.

PopupWindow com.ab.view.titlebar.AbTitleBar.popupWindow
private

下拉选择.

LinearLayout com.ab.view.titlebar.AbTitleBar.rightLayout = null
protected

右边的View,可以自定义显示什么.

LinearLayout.LayoutParams com.ab.view.titlebar.AbTitleBar.rightViewLayoutParams = null
private

右边布局的的对齐参数.

Button com.ab.view.titlebar.AbTitleBar.titleSmallTextBtn = null
protected

显示标题文字的小View.

Button com.ab.view.titlebar.AbTitleBar.titleTextBtn = null
protected

显示标题文字的View.

LinearLayout com.ab.view.titlebar.AbTitleBar.titleTextLayout = null
protected

标题布局.

LinearLayout.LayoutParams com.ab.view.titlebar.AbTitleBar.titleTextLayoutParams = null
private

标题文本的对齐参数.


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