From c29572f79e75f26e6fb07fecb036d9fdfc4421d6 Mon Sep 17 00:00:00 2001 From: Aurelien Hubert Date: Mon, 11 Mar 2019 13:23:23 +0100 Subject: [PATCH] Add SelectableDataSource interface --- .../ui/adapter/RowRepresentableDataSource.kt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/pokeranalytics/android/ui/adapter/RowRepresentableDataSource.kt b/app/src/main/java/net/pokeranalytics/android/ui/adapter/RowRepresentableDataSource.kt index 4f73b66f..1aadf238 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/adapter/RowRepresentableDataSource.kt +++ b/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 { 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 + } } \ No newline at end of file