AndBase开发框架  1.5.8r3
 全部  命名空间 文件 函数 变量 枚举值 
| Public 成员函数 | 静态 Public 成员函数 | Private 属性 | 静态 Private 属性 | 所有成员列表
com.ab.view.table.AbTable类 参考

interface  AbOnItemClickListener
 

Public 成员函数

String[] getTitles ()
 
void setTitles (String[] titles)
 
List< String[]> getContents ()
 
void setContents (List< String[]> contents)
 
int[] getCellTypes ()
 
void setCellTypes (int[] cellTypes)
 
int[] getCellWidth ()
 
void setCellWidth (int[] cellWidth)
 
int[] getRowHeight ()
 
void setRowHeight (int[] rowHeight)
 
int[] getRowTextSize ()
 
void setRowTextSize (int[] rowTextSize)
 
int[] getRowTextColor ()
 
void setRowTextColor (int[] rowTextColor)
 
int[] getTableResource ()
 
void setTableResource (int[] tableResource)
 
AbOnItemClickListener getItemCellTouchListener ()
 
void setItemCellTouchListener (AbOnItemClickListener itemCellTouchListener)
 
AbOnItemClickListener getItemCellCheckListener ()
 
void setItemCellCheckListener (AbOnItemClickListener itemCellCheckListener)
 

静态 Public 成员函数

static AbTable newAbTable (Context context, int columnSize)
 

Private 属性

String[] titles
 
List< String[]> contents
 
int[] cellTypes
 
int[] cellWidth
 
int[] rowHeight
 
int[] rowTextSize
 
int[] rowTextColor
 
int[] tableResource
 
AbOnItemClickListener itemCellTouchListener
 
AbOnItemClickListener itemCellCheckListener
 

静态 Private 属性

static AbTable mAbTable = null
 
static int mScreenWidth = 0
 
static int mScreenHeight = 0
 

详细描述

© 2012 amsoft.cn 名称:AbCellType.java 描述:表格控件实体类

(1)标题配置

titles = new String[] { "标题1", "标题2", "标题3", "标题4","标题5"};

(2)内容列表配置(初始为空的)

contents = new ArrayList<String[]>();

(3)列类型配置(参照AbCellType)

cellTypes = new int[] { AbCellType.STRING, AbCellType.STRING, AbCellType.STRING, AbCellType.STRING,AbCellType.STRING};

(4)列宽配置(%) 超过100% 可以横向滑动

cellWidth = new int[] {20,50,10,20,50};

(5)行高(索引0:标题高,1:内容列表高)

rowHeight = new int[] { 35, 35 };

(6)行文字大小(索引0标题,1内容列表)

rowTextSize = new int[] { 15, 12};

(7)行文字颜色(索引0标题,1内容列表)

rowTextColor = new int[] {Color.rgb(255, 255, 255),Color.rgb(113, 113, 113) };

(8)背景资源(索引0标题行背景,1标题单元格背景,2内容列表行背景。3表格内容单元格背景)

tableResource = new int[] {android.R.color.transparent,R.drawable.title_cell,android.R.color.transparent,R.drawable.content_cell};

(9)表格实体(通过newAbTable实例化并初始化列数,可自动完成AbTable的配置)

table = AbTable.newAbTable(this,5);

table.setTitles(titles);

table.setContents(contents);

table.setCellTypes(cellTypes);

table.setCellWidth(cellWidth);

table.setRowHeight(rowHeight);

table.setRowTextSize(rowTextSize);

table.setTableResource(tableResource);

table.setRowTextColor(rowTextColor);

(10)AbTableArrayAdapter对象

mAbTableArrayAdapter = new AbTableArrayAdapter(this, table);

(12)ListView(布局参照):

   < HorizontalScrollView

     android:id="@+id/horView"

     android:layout_width="fill_parent"

     android:layout_height="fill_parent" >

     <ListView

       android:id="@+id/mListView"

       android:layout_width="wrap_content"

       android:layout_height="wrap_content"

       android:cacheColorHint="#00000000"

       android:divider="@android:color/transparent"

       android:dividerHeight="0dip" >

     < /ListView>

  < /HorizontalScrollView>

mListView = (ListView)findViewById(R.id.mListView);

(11)设置Adapter

mListView.setAdapter(tableAdapter);

作者
还如一梦中
版本
v1.0
日期
:2013-01-18 下午11:52:13

成员函数说明

int [] com.ab.view.table.AbTable.getCellTypes ( )
inline

Gets the cell types.

返回
the cell types
int [] com.ab.view.table.AbTable.getCellWidth ( )
inline

Gets the cell width.

返回
the cell width
List<String[]> com.ab.view.table.AbTable.getContents ( )
inline

Gets the contents.

返回
the contents
AbOnItemClickListener com.ab.view.table.AbTable.getItemCellCheckListener ( )
inline

Gets the item cell check listener.

返回
the item cell check listener
AbOnItemClickListener com.ab.view.table.AbTable.getItemCellTouchListener ( )
inline

Gets the item cell touch listener.

返回
the item cell touch listener
int [] com.ab.view.table.AbTable.getRowHeight ( )
inline

Gets the row height.

返回
the row height
int [] com.ab.view.table.AbTable.getRowTextColor ( )
inline

Gets the row text color.

返回
the row text color
int [] com.ab.view.table.AbTable.getRowTextSize ( )
inline

Gets the row text size.

返回
the row text size
int [] com.ab.view.table.AbTable.getTableResource ( )
inline

Gets the table resource.

返回
the table resource
String [] com.ab.view.table.AbTable.getTitles ( )
inline

描述:获取表格的标题.

返回
the titles
static AbTable com.ab.view.table.AbTable.newAbTable ( Context  context,
int  columnSize 
)
inlinestatic

描述:表格对象构造.

参数
contextcontext对象
columnSize列数
返回
the ab table
void com.ab.view.table.AbTable.setCellTypes ( int[]  cellTypes)
inline

描述:列类型配置(参照AbCellType).

参数
cellTypes列类型
void com.ab.view.table.AbTable.setCellWidth ( int[]  cellWidth)
inline

描述:列宽配置(%) 超过100% 可以横向滑动.

参数
cellWidth列宽的百分比
void com.ab.view.table.AbTable.setContents ( List< String[]>  contents)
inline

描述:设置列表内容的数据.

参数
contents列表内容的数据
void com.ab.view.table.AbTable.setItemCellCheckListener ( AbOnItemClickListener  itemCellCheckListener)
inline

描述:复选框cell,一行中的某一个cell被点击.

参数
itemCellCheckListenerthe new item cell check listener
void com.ab.view.table.AbTable.setItemCellTouchListener ( AbOnItemClickListener  itemCellTouchListener)
inline

描述:图片cell,一行中的某一个cell被点击.

参数
itemCellTouchListenerthe new item cell touch listener
void com.ab.view.table.AbTable.setRowHeight ( int[]  rowHeight)
inline

描述:设置行高(索引0:标题高,1:内容列表高).

参数
rowHeight行高
void com.ab.view.table.AbTable.setRowTextColor ( int[]  rowTextColor)
inline

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

参数
rowTextColor行文字的颜色
void com.ab.view.table.AbTable.setRowTextSize ( int[]  rowTextSize)
inline

描述:设置行文字的大小(索引0标题,1内容列表).

参数
rowTextSize行文字的大小
void com.ab.view.table.AbTable.setTableResource ( int[]  tableResource)
inline

描述:表格的背景资源(索引0标题行背景,1标题单元格背景,2内容列表行背景。3表格内容单元格背景).

参数
tableResourcethe new table resource
void com.ab.view.table.AbTable.setTitles ( String[]  titles)
inline

描述:设置表格的标题.

参数
titles表格的标题数组

类成员变量说明

int [] com.ab.view.table.AbTable.cellTypes
private

单元格类型数组.

int [] com.ab.view.table.AbTable.cellWidth
private

单元格宽度数组.

List<String[]> com.ab.view.table.AbTable.contents
private

内容列表数组.

AbOnItemClickListener com.ab.view.table.AbTable.itemCellCheckListener
private

The item cell check listener.

AbOnItemClickListener com.ab.view.table.AbTable.itemCellTouchListener
private

The item cell touch listener.

AbTable com.ab.view.table.AbTable.mAbTable = null
staticprivate

AbTable实例.

int com.ab.view.table.AbTable.mScreenHeight = 0
staticprivate

屏幕的高.

int com.ab.view.table.AbTable.mScreenWidth = 0
staticprivate

屏幕的宽.

int [] com.ab.view.table.AbTable.rowHeight
private

行高度数组(索引0标题,1内容列表).

int [] com.ab.view.table.AbTable.rowTextColor
private

行文字颜色数组(索引0标题,1内容列表).

int [] com.ab.view.table.AbTable.rowTextSize
private

行文字大小数组(索引0标题,1内容列表).

int [] com.ab.view.table.AbTable.tableResource
private

表格资源数组(索引0标题行背景,1标题单元格背景,2内容列表行背景。3表格内容单元格背景).

String [] com.ab.view.table.AbTable.titles
private

标题数组.


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