|
|
|
|
@ -13,6 +13,7 @@ import com.github.mikephil.charting.data.LineDataSet |
|
|
|
|
import com.github.mikephil.charting.highlight.Highlight |
|
|
|
|
import com.github.mikephil.charting.listener.OnChartValueSelectedListener |
|
|
|
|
import com.google.android.material.chip.Chip |
|
|
|
|
import com.google.android.material.chip.ChipGroup |
|
|
|
|
import kotlinx.android.synthetic.main.fragment_evograph.* |
|
|
|
|
import net.pokeranalytics.android.R |
|
|
|
|
import net.pokeranalytics.android.calculus.GraphType |
|
|
|
|
@ -21,7 +22,9 @@ import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
|
import net.pokeranalytics.android.ui.graph.setStyle |
|
|
|
|
import net.pokeranalytics.android.ui.view.LegendView |
|
|
|
|
import net.pokeranalytics.android.util.extensions.ChipGroupExtension |
|
|
|
|
import net.pokeranalytics.android.util.extensions.px |
|
|
|
|
import net.pokeranalytics.android.util.extensions.toast |
|
|
|
|
|
|
|
|
|
interface GraphDataSource { |
|
|
|
|
|
|
|
|
|
@ -109,9 +112,12 @@ class GraphFragment : PokerAnalyticsFragment(), OnChartValueSelectedListener { |
|
|
|
|
this.chipGroup.addView(chip) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.chipGroup.setOnCheckedChangeListener { group, i -> |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.chipGroup.setOnCheckedChangeListener(object : ChipGroupExtension.SingleSelectionOnCheckedListener() { |
|
|
|
|
override fun onCheckedChanged(group: ChipGroup, checkedId: Int) { |
|
|
|
|
super.onCheckedChanged(group, checkedId) |
|
|
|
|
toast("Show: ${stat.aggregationTypes[group.getChildAt(checkedId).id].name}") |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.chipGroup.check(this.stat.aggregationTypes.first().ordinal) |
|
|
|
|
} |
|
|
|
|
@ -144,7 +150,6 @@ class GraphFragment : PokerAnalyticsFragment(), OnChartValueSelectedListener { |
|
|
|
|
// this.text.text = "" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|