wip in comment

feature/top10
Razmig Sarkissian 7 years ago
parent c1f71bf4ec
commit ffe3e41d42
  1. 26
      app/src/main/java/net/pokeranalytics/android/ui/view/rowrepresentable/FilterCategoryRow.kt
  2. 28
      app/src/main/java/net/pokeranalytics/android/ui/view/rowrepresentable/FilterRow.kt
  3. 9
      app/src/main/java/net/pokeranalytics/android/ui/view/rowrepresentable/FilterSubcategoryRow.kt

@ -4,6 +4,32 @@ import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.view.RowRepresentable import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowViewType import net.pokeranalytics.android.ui.view.RowViewType
/*
enum class FilterCategoryRow(override val resId: Int?, val subCategories:Array<out RowRepresentable>, override val viewType: Int = RowViewType.TITLE_VALUE_ARROW.ordinal) : RowRepresentable {
GENERAL(R.string.general, GeneralSubCategory.values()),
DATE,
DURATION,
SESSION,
CASH,
TOURNAMENT,
ONLINE,
RESULT,
TRANSACTION_TYPES,
// Title Custom fields
LOCATION,
BANKROLL,
PLAYERS;
private enum class GeneralSubCategory(val category : FilterCategoryRow = GENERAL): RowRepresentable {
CASH_TOURNAMENT,
LIVE_ONLINE,
GAME,
LIMIT_TYPE,
TABLE_SIZE,
}
*/
enum class FilterCategoryRow : RowRepresentable { enum class FilterCategoryRow : RowRepresentable {
GENERAL, GENERAL,

@ -4,6 +4,34 @@ import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.view.RowRepresentable import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowViewType import net.pokeranalytics.android.ui.view.RowViewType
/*
sealed class FilterElement : RowRepresentable {
class Cash : FilterElement()
class Tournament : FilterElement()
data class Game(val game: net.pokeranalytics.android.model.realm.Game) : FilterElement()
var value : Any? = null
override val resId: Int?
get() {
return when (this) {
is Cash -> R.string.cash_game
is Tournament -> R.string.tournament
else -> null
}
}
override val viewType: Int
get() {
return when (this) {
else -> RowViewType.TITLE_CHECK.ordinal
}
}
}
*/
enum class FilterRow : RowRepresentable { enum class FilterRow : RowRepresentable {
// General // General

@ -15,7 +15,14 @@ import java.text.DateFormatSymbols
import java.util.* import java.util.*
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
/*
GAME -> {
val games = realm.copyFromRealm(LiveData.GAME.items(realm) as RealmResults<Game>)
games.forEach {
rows.add(FilterElement.Game(game = it))
}
}
*/
enum class FilterSubcategoryRow : RowRepresentable { enum class FilterSubcategoryRow : RowRepresentable {
// General // General

Loading…
Cancel
Save