|
|
|
|
@ -11,7 +11,7 @@ import net.pokeranalytics.android.R |
|
|
|
|
import net.pokeranalytics.android.ui.adapter.components.* |
|
|
|
|
import net.pokeranalytics.android.util.PokerAnalyticsFragment |
|
|
|
|
|
|
|
|
|
class SettingsFragment : PokerAnalyticsFragment(), DynamicRowDelegate { |
|
|
|
|
class SettingsFragment : PokerAnalyticsFragment(), DynamicRowDelegate, DynamicRowCallback { |
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
|
|
|
|
|
|
@ -44,6 +44,10 @@ class SettingsFragment : PokerAnalyticsFragment(), DynamicRowDelegate { |
|
|
|
|
return rows |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onRowSelected(row: DynamicRowInterface) { |
|
|
|
|
val bottomSheetFragment = openBottomSheet(row) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Init data |
|
|
|
|
*/ |
|
|
|
|
@ -51,11 +55,8 @@ class SettingsFragment : PokerAnalyticsFragment(), DynamicRowDelegate { |
|
|
|
|
|
|
|
|
|
val viewManager = LinearLayoutManager(requireContext()) |
|
|
|
|
settingsAdapter = DynamicListAdapter( |
|
|
|
|
this |
|
|
|
|
this, this |
|
|
|
|
) |
|
|
|
|
settingsAdapter.callback = { |
|
|
|
|
val bottomSheetFragment = openBottomSheet() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
recyclerView.apply { |
|
|
|
|
setHasFixedSize(true) |
|
|
|
|
|