public abstract class LongPressAwareTableDataAdapter<T> extends TableDataAdapter<T>
TableDataAdapter that supports different row rendering by long clicking them.
If the user does a long click on a row, the method getLongPressCellView(int, int, ViewGroup)
is called, else the getDefaultCellView(int, int, ViewGroup) is called.| Constructor and Description |
|---|
LongPressAwareTableDataAdapter(android.content.Context context,
java.util.List<T> data,
TableView<T> tableView)
Creates a new
LongPressAwareTableDataAdapter with the given paramters. |
| Modifier and Type | Method and Description |
|---|---|
android.view.View |
getCellView(int rowIndex,
int columnIndex,
android.view.ViewGroup parentView)
Method that gives the cell views for the different table cells.
|
abstract android.view.View |
getDefaultCellView(int rowIndex,
int columnIndex,
android.view.ViewGroup parentView)
The cell view that is displayed to the user when the row is collapsed.
|
abstract android.view.View |
getLongPressCellView(int rowIndex,
int columnIndex,
android.view.ViewGroup parentView)
The cell view that is displayed to the user when the use long pressed the row containing this cell.
|
getColumnModel, getContext, getData, getLayoutInflater, getResources, getRowData, getView, setColumnModel, setRowBackgroundProvideradd, addAll, addAll, clear, createFromResource, getCount, getDropDownView, getDropDownViewTheme, getFilter, getItem, getItemId, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setDropDownViewTheme, setNotifyOnChange, sortareAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserverpublic LongPressAwareTableDataAdapter(android.content.Context context,
java.util.List<T> data,
TableView<T> tableView)
LongPressAwareTableDataAdapter with the given paramters.context - The context that shall be used.data - The data that shall be displayed.tableView - The table to listen for long presses by the user.public final android.view.View getCellView(int rowIndex,
int columnIndex,
android.view.ViewGroup parentView)
TableDataAdaptergetCellView in class TableDataAdapter<T>rowIndex - The index of the row to return the table cell view.columnIndex - The index of the column to return the table cell view.parentView - The view to which the returned view will be added.public abstract android.view.View getDefaultCellView(int rowIndex,
int columnIndex,
android.view.ViewGroup parentView)
rowIndex - The index of the row where this cell is displayed.columnIndex - The index of the column where this cell is displayed.parentView - The parentView (the row) of this cell.public abstract android.view.View getLongPressCellView(int rowIndex,
int columnIndex,
android.view.ViewGroup parentView)
rowIndex - The index of the row where this cell is displayed.columnIndex - The index of the column where this cell is displayed.parentView - The parentView (the row) of this cell.