|
|
|
@ -1,9 +1,7 @@ |
|
|
|
package net.pokeranalytics.android.ui.fragment |
|
|
|
package net.pokeranalytics.android.ui.fragment |
|
|
|
|
|
|
|
|
|
|
|
import android.os.Bundle |
|
|
|
import android.os.Bundle |
|
|
|
import android.view.LayoutInflater |
|
|
|
import android.view.* |
|
|
|
import android.view.View |
|
|
|
|
|
|
|
import android.view.ViewGroup |
|
|
|
|
|
|
|
import kotlinx.android.synthetic.main.fragment_comparison_chart.* |
|
|
|
import kotlinx.android.synthetic.main.fragment_comparison_chart.* |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.ui.activity.BankrollActivity |
|
|
|
import net.pokeranalytics.android.ui.activity.BankrollActivity |
|
|
|
@ -15,6 +13,7 @@ import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.MoreTabRow |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.MoreTabRow |
|
|
|
|
|
|
|
import net.pokeranalytics.android.util.extensions.toast |
|
|
|
|
|
|
|
|
|
|
|
class ComparisonChartFragment : PokerAnalyticsFragment(), StaticRowRepresentableDataSource, RowRepresentableDelegate { |
|
|
|
class ComparisonChartFragment : PokerAnalyticsFragment(), StaticRowRepresentableDataSource, RowRepresentableDelegate { |
|
|
|
|
|
|
|
|
|
|
|
@ -40,6 +39,7 @@ class ComparisonChartFragment : PokerAnalyticsFragment(), StaticRowRepresentable |
|
|
|
|
|
|
|
|
|
|
|
private lateinit var parentActivity: PokerAnalyticsActivity |
|
|
|
private lateinit var parentActivity: PokerAnalyticsActivity |
|
|
|
private lateinit var viewPagerAdapter: ComparisonChartPagerAdapter |
|
|
|
private lateinit var viewPagerAdapter: ComparisonChartPagerAdapter |
|
|
|
|
|
|
|
private var comparisonChartMenu: Menu? = null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Life Cycle |
|
|
|
// Life Cycle |
|
|
|
@ -54,6 +54,19 @@ class ComparisonChartFragment : PokerAnalyticsFragment(), StaticRowRepresentable |
|
|
|
initUI() |
|
|
|
initUI() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onCreateOptionsMenu(menu: Menu?, inflater: MenuInflater?) { |
|
|
|
|
|
|
|
inflater?.inflate(R.menu.toolbar_comparison_chart, menu) |
|
|
|
|
|
|
|
this.comparisonChartMenu = menu |
|
|
|
|
|
|
|
super.onCreateOptionsMenu(menu, inflater) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onOptionsItemSelected(item: MenuItem?): Boolean { |
|
|
|
|
|
|
|
when (item!!.itemId) { |
|
|
|
|
|
|
|
R.id.settings -> openChangeStatistics() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Rows |
|
|
|
// Rows |
|
|
|
override fun adapterRows(): List<RowRepresentable>? { |
|
|
|
override fun adapterRows(): List<RowRepresentable>? { |
|
|
|
return rowRepresentation |
|
|
|
return rowRepresentation |
|
|
|
@ -98,4 +111,12 @@ class ComparisonChartFragment : PokerAnalyticsFragment(), StaticRowRepresentable |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Open change statistics |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private fun openChangeStatistics() { |
|
|
|
|
|
|
|
//TODO |
|
|
|
|
|
|
|
toast("Open change statistics") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |