public abstract class TableHeaderAdapter
extends java.lang.Object
TableHeaderView
.Modifier | Constructor and Description |
---|---|
|
TableHeaderAdapter(Context context)
Creates a new TableHeaderAdapter.
|
protected |
TableHeaderAdapter(Context context,
int columnCount)
Creates a new TableHeaderAdapter.
|
protected |
TableHeaderAdapter(Context context,
TableColumnModel columnModel)
Creates a new TableHeaderAdapter.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getColumnCount()
Gives the column count that is currently used to render the table headers.
|
protected TableColumnModel |
getColumnModel()
Gives the
TableColumnModel that is currently used to render the table headers. |
protected int |
getColumnWeight(int columnIndex)
Gives the column weight (the relative width of a column) of the column at the given index.
|
protected int |
getColumnWeightSum()
Gives the overall column weight (sum of all column weights).
|
Context |
getContext()
Gives the
Context of this adapter. |
abstract View |
getHeaderView(int columnIndex,
ViewGroup parentView)
Method that gives the header views for the different columns.
|
LayoutInflater |
getLayoutInflater()
Gives the
LayoutInflater of this adapter. |
Resources |
getResources()
Gives the
Resources of this adapter. |
protected void |
setColumnCount(int columnCount)
Sets the column count which is used to render the table headers.
|
protected void |
setColumnModel(TableColumnModel columnModel)
Sets the
TableColumnModel that will be used to render the table headers. |
protected void |
setColumnWeight(int columnIndex,
int columnWeight)
Sets the column weight (the relative width of a column) of the column at the given index.
|
public TableHeaderAdapter(Context context)
context
- The context that shall be used.protected TableHeaderAdapter(Context context, int columnCount)
context
- The context that shall be used.columnCount
- The number of columns.protected TableHeaderAdapter(Context context, TableColumnModel columnModel)
context
- The context that shall be used.columnModel
- The column model to be used.public Context getContext()
Context
of this adapter. (Hint: use this method in the getHeaderView()
-method
to programmatically initialize new views.)Context
of this adapter.public LayoutInflater getLayoutInflater()
LayoutInflater
of this adapter. (Hint: use this method in the
getHeaderView()
-method to inflate xml-layout-files.)LayoutInflater
of this adapter.public Resources getResources()
Resources
of this adapter. (Hint: use this method in the
getHeaderView()
-method to resolve resources.)Resources
of the context of this adapter.protected void setColumnModel(TableColumnModel columnModel)
TableColumnModel
that will be used to render the table headers.columnModel
- The TableColumnModel
that should be set.protected TableColumnModel getColumnModel()
TableColumnModel
that is currently used to render the table headers.protected void setColumnCount(int columnCount)
columnCount
- The column count that should be set.protected int getColumnCount()
protected void setColumnWeight(int columnIndex, int columnWeight)
columnIndex
- The index of the column to which this weight should be assigned.columnWeight
- The weight that should be set to the column at the given index.protected int getColumnWeight(int columnIndex)
columnIndex
- The index of the column to receive the column weight.protected int getColumnWeightSum()
public abstract View getHeaderView(int columnIndex, ViewGroup parentView)
columnIndex
- The index of the column to return the header view.parentView
- The view to which the returned view will be added.