public abstract class DataSetSubscriber extends Object
This class defines the data behavior that an subscriber needs to observe, such as data changes and invalidated data. You can override the methods in this class to make responses to the data changes.
| 构造器 | 说明 |
|---|---|
DataSetSubscriber() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onChanged() |
Monitors data changes.
|
void |
onInvalidated() |
Monitors invalid data.
|
void |
onItemChanged(int position) |
Monitors data item changes.
|
void |
onItemInserted(int position) |
Monitors data item inserted.
|
void |
onItemRangeChanged(int startPos,
int countItems) |
Monitors data items range changed.
|
void |
onItemRangeInserted(int startPos,
int countItems) |
Monitors data data items range inserted.
|
void |
onItemRangeRemoved(int startPos,
int countItems) |
Monitors data items range removed.
|
void |
onItemRemoved(int position) |
Monitors data item removed.
|
public void onChanged()
This method can be called when data changes.
public void onInvalidated()
This method can be called when data becomes invalid.
public void onItemChanged(int position)
This method can be called when one data item changes.
position - Indicates the position of the item in the dataset.public void onItemInserted(int position)
This method can be called when one data item inserted.
position - Indicates the position of the item in the dataset.public void onItemRemoved(int position)
This method can be called when one data item removed.
position - Indicates the position of the item in the dataset.public void onItemRangeChanged(int startPos,
int countItems)
This method can be called when data items range changed.
startPos - Indicates the start position of the item in the dataset.countItems - Indicates the number of affected items in the dataset.public void onItemRangeInserted(int startPos,
int countItems)
This method can be called when data items range inserted.
startPos - Indicates the start position of the item in the dataset.countItems - Indicates the number of affected items in the dataset.public void onItemRangeRemoved(int startPos,
int countItems)
This method can be called when data items range removed.
startPos - Indicates the start position of the item in the dataset.countItems - Indicates the number of affected items in the dataset.