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

Public 成员函数

 AbTextView (Context context, AttributeSet attrs)
 
void setPadding (float left, float top, float right, float bottom)
 
int subStringLength (String str, int maxPix, TextPaint paint)
 
float getStringWidth (String str, TextPaint paint)
 
float getDesiredWidth (String str, TextPaint paint)
 
List< String > getDrawRowStr (String text, int maxWPix, TextPaint paint)
 
int getDrawRowCount (String text, int maxWPix, TextPaint paint)
 
int drawText (Canvas canvas, String text, int maxWPix, TextPaint paint)
 

Protected 成员函数

void onDraw (Canvas canvas)
 

Private 属性

float leftPadding = 0
 
float topPadding = 0
 
float rightPadding = 0
 
float bottomPadding = 0
 
float lineSpacing = 0
 
int maxLines = 1
 
float textSize = 14
 
int textColor = Color.WHITE
 
TextPaint mTextPaint = null
 

详细描述

© 2012 amsoft.cn 名称:AbTextView.java 描述:中英混合乱换行问题 .

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

构造及析构函数说明

com.ab.view.sample.AbTextView.AbTextView ( Context  context,
AttributeSet  attrs 
)
inline

Instantiates a new ab text view.

参数
contextthe context
attrsthe attrs

成员函数说明

int com.ab.view.sample.AbTextView.drawText ( Canvas  canvas,
String  text,
int  maxWPix,
TextPaint  paint 
)
inline

Draw text.

参数
canvasthe canvas
textthe text
maxWPixthe max w pix
paintthe paint
返回
the int
float com.ab.view.sample.AbTextView.getDesiredWidth ( String  str,
TextPaint  paint 
)
inline

Gets the desired width.

参数
strthe str
paintthe paint
返回
the desired width
int com.ab.view.sample.AbTextView.getDrawRowCount ( String  text,
int  maxWPix,
TextPaint  paint 
)
inline

Gets the draw row count.

参数
textthe text
maxWPixthe max w pix
paintthe paint
返回
the draw row count
List<String> com.ab.view.sample.AbTextView.getDrawRowStr ( String  text,
int  maxWPix,
TextPaint  paint 
)
inline

Gets the draw row str.

参数
textthe text
maxWPixthe max w pix
paintthe paint
返回
the draw row str
float com.ab.view.sample.AbTextView.getStringWidth ( String  str,
TextPaint  paint 
)
inline

Gets the string width.

参数
strthe str
paintthe paint
返回
the string width
void com.ab.view.sample.AbTextView.onDraw ( Canvas  canvas)
inlineprotected
void com.ab.view.sample.AbTextView.setPadding ( float  left,
float  top,
float  right,
float  bottom 
)
inline

Sets the padding.

参数
leftthe left
topthe top
rightthe right
bottomthe bottom
int com.ab.view.sample.AbTextView.subStringLength ( String  str,
int  maxPix,
TextPaint  paint 
)
inline

Sub string length.

参数
strthe str
maxPixthe max pix
paintthe paint
返回
the int

类成员变量说明

float com.ab.view.sample.AbTextView.bottomPadding = 0
private

The bottom padding.

float com.ab.view.sample.AbTextView.leftPadding = 0
private

padding.

float com.ab.view.sample.AbTextView.lineSpacing = 0
private

The line spacing.

int com.ab.view.sample.AbTextView.maxLines = 1
private

最大行数.

TextPaint com.ab.view.sample.AbTextView.mTextPaint = null
private

TextPaint.

float com.ab.view.sample.AbTextView.rightPadding = 0
private

The right padding.

int com.ab.view.sample.AbTextView.textColor = Color.WHITE
private

文字颜色.

float com.ab.view.sample.AbTextView.textSize = 14
private

文字大小.

float com.ab.view.sample.AbTextView.topPadding = 0
private

The top padding.


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