forked from upstream-mirrors/OpenTracks
In the ChartSettingsDialog, update whether to display speed
or pace when calling onPrepareDialog. Change the x_axis.png and y_axis.png to white foreground so they show up on the black background. Clean up chart_settings.xml - no need to specify minWidth by placing the title inside a TableLayout - align text to the bottom of the image
This commit is contained in:
@@ -240,6 +240,7 @@ public class ChartActivity extends Activity implements TrackDataListener {
|
||||
|
||||
private void prepareSettingsDialog(ChartSettingsDialog settingsDialog) {
|
||||
settingsDialog.setMode(chartView.getMode());
|
||||
settingsDialog.setDisplaySpeed(reportSpeed);
|
||||
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
|
||||
settingsDialog.setSeriesEnabled(i, chartView.isChartValueSeriesEnabled(i));
|
||||
}
|
||||
|
||||
@@ -89,6 +89,15 @@ public class ChartSettingsDialog extends Dialog {
|
||||
? R.id.chart_settings_by_distance
|
||||
: R.id.chart_settings_by_time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether to display speed or pace.
|
||||
*
|
||||
* @param displaySpeed true to display speed
|
||||
*/
|
||||
public void setDisplaySpeed(boolean displaySpeed) {
|
||||
series[ChartView.SPEED_SERIES].setText(displaySpeed ? R.string.stat_speed : R.string.stat_pace);
|
||||
}
|
||||
|
||||
public void setSeriesEnabled(int seriesIdx, boolean enabled) {
|
||||
series[seriesIdx].setChecked(enabled);
|
||||
|
||||
Reference in New Issue
Block a user