|
|
|
|
@ -12,7 +12,7 @@ import net.pokeranalytics.android.ui.activity.components.ReportActivity |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.report.ProgressReportFragment |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class StatisticsDetailsParameters(var stat: Stat, var report: Report, var title: String? = null) |
|
|
|
|
class StatisticsDetailsParameters(var stat: Stat, var report: Report, var title: String) |
|
|
|
|
|
|
|
|
|
class ProgressReportActivity : PokerAnalyticsActivity() { |
|
|
|
|
|
|
|
|
|
@ -25,14 +25,14 @@ class ProgressReportActivity : PokerAnalyticsActivity() { |
|
|
|
|
/** |
|
|
|
|
* Default constructor |
|
|
|
|
*/ |
|
|
|
|
fun newInstance(context: Context, stat: Stat, report: Report, displayAggregationChoices: Boolean = true, title: String? = null) { |
|
|
|
|
fun newInstance(context: Context, stat: Stat, report: Report, displayAggregationChoices: Boolean = true, title: String) { |
|
|
|
|
this.parameters = StatisticsDetailsParameters(stat, report, title) |
|
|
|
|
this.displayAggregationChoices = displayAggregationChoices |
|
|
|
|
val intent = Intent(context, ProgressReportActivity::class.java) |
|
|
|
|
context.startActivity(intent) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun newInstanceForResult(fragment: Fragment, stat: Stat, report: Report, displayAggregationChoices: Boolean = true, title: String? = null) { |
|
|
|
|
fun newInstanceForResult(fragment: Fragment, stat: Stat, report: Report, displayAggregationChoices: Boolean = true, title: String) { |
|
|
|
|
this.parameters = StatisticsDetailsParameters(stat, report, title) |
|
|
|
|
this.displayAggregationChoices = displayAggregationChoices |
|
|
|
|
val intent = Intent(fragment.context, ProgressReportActivity::class.java) |
|
|
|
|
@ -58,6 +58,7 @@ class ProgressReportActivity : PokerAnalyticsActivity() { |
|
|
|
|
fragmentTransaction.commit() |
|
|
|
|
|
|
|
|
|
parameters?.let { |
|
|
|
|
|
|
|
|
|
statisticDetailsFragment.setData(it.stat, it.report, displayAggregationChoices, it.title) |
|
|
|
|
parameters = null |
|
|
|
|
} |
|
|
|
|
|