|
|
|
@ -2,8 +2,15 @@ package net.pokeranalytics.android.ui.adapter.components |
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context |
|
|
|
import android.content.Context |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.BottomSheetType |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface DynamicRowInterface { |
|
|
|
|
|
|
|
fun localizedTitle(context: Context): String |
|
|
|
|
|
|
|
var viewType: Int |
|
|
|
|
|
|
|
var bottomSheetType: BottomSheetType |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class SectionRow(stringRes: Int) : DynamicRowInterface { |
|
|
|
class SectionRow(stringRes: Int) : DynamicRowInterface { |
|
|
|
|
|
|
|
|
|
|
|
var stringRes: Int = stringRes |
|
|
|
var stringRes: Int = stringRes |
|
|
|
@ -13,14 +20,7 @@ class SectionRow(stringRes: Int) : DynamicRowInterface { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override var viewType: Int = 0 |
|
|
|
override var viewType: Int = 0 |
|
|
|
|
|
|
|
override var bottomSheetType: BottomSheetType = BottomSheetType.NONE |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface DynamicRowInterface { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun localizedTitle(context: Context): String |
|
|
|
|
|
|
|
var viewType: Int |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class SessionRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class SessionRow(val resId: Int) : DynamicRowInterface { |
|
|
|
@ -39,6 +39,14 @@ enum class SessionRow(val resId: Int) : DynamicRowInterface { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override var bottomSheetType: BottomSheetType = BottomSheetType.NONE |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return when (this) { |
|
|
|
|
|
|
|
BLINDS -> BottomSheetType.BLINDS |
|
|
|
|
|
|
|
GAME -> BottomSheetType.GAME |
|
|
|
|
|
|
|
DATE -> BottomSheetType.DATE |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
@ -51,7 +59,7 @@ enum class BankrollRow(val resId: Int) : DynamicRowInterface { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override var viewType: Int = 1 |
|
|
|
override var viewType: Int = 1 |
|
|
|
|
|
|
|
override var bottomSheetType: BottomSheetType = BottomSheetType.NONE |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum class DataObjectRowType(val resId: Int) : DynamicRowInterface { |
|
|
|
enum class DataObjectRowType(val resId: Int) : DynamicRowInterface { |
|
|
|
@ -66,4 +74,5 @@ enum class DataObjectRowType(val resId: Int) : DynamicRowInterface { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override var viewType: Int = RowViewType.TITLE.ordinal |
|
|
|
override var viewType: Int = RowViewType.TITLE.ordinal |
|
|
|
|
|
|
|
override var bottomSheetType: BottomSheetType = BottomSheetType.NONE |
|
|
|
} |
|
|
|
} |