Add SelectableDataSource interface

feature/top10
Aurelien Hubert 7 years ago
parent 83df23d080
commit c29572f79e
  1. 15
      app/src/main/java/net/pokeranalytics/android/ui/adapter/RowRepresentableDataSource.kt

@ -8,7 +8,7 @@ import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor
/**
* Base Interface to provide the RowRepresentable to the adapter
*/
interface RowRepresentableDataSource: EditableDataSource, DisplayableDataSource {
interface RowRepresentableDataSource: EditableDataSource, DisplayableDataSource, SelectableDataSource {
/**
* Returns a prebuild list of rows
@ -157,4 +157,17 @@ interface EditableDataSource {
fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
return ArrayList()
}
}
/**
* An interface providing a way to select a row
*/
interface SelectableDataSource {
/**
* A boolean to indicate if the row is selected or not
*/
fun isSelected(row: RowRepresentable): Boolean {
return false
}
}
Loading…
Cancel
Save