If you think the Android project task-timer-legacy listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.gawdl3y.android.actionablelistview;
/*www.java2s.com*//**
* An adapter that contains a method to receive actions, for use with {@code ActionableListView}s
* @author Schuyler Cebulskie
*/publicabstractclass ActionableAdapter extends CheckableAdapter implements Actionable {
/**
* Performs an action on an item
* @param actionType The type of action to perform
* @param position The position of the item to perform on
* @return {@code true} if this affects the data order, {@code false} if it does not
*/publicabstractboolean performActionOnItem(int actionType, int position);
/**
* Performs an action on multiple items
* @param actionType The type of action to perform
* @param positions The positions of the items to perform on
* @return {@code true} if this affects the data order, {@code false} if it does not
*/publicboolean performActionOnItems(int actionType, int[] positions) {
boolean dataOrderSanctityLost = false;
for(int p : positions) {
if(performAction(actionType, p)) dataOrderSanctityLost = true;
}
return dataOrderSanctityLost;
}
/**
* Forwards the call to performActionOnItem
*/
@Override
publicboolean performAction(int actionType, int id) {
return performActionOnItem(actionType, id);
}
}