mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Respiratory rate: remove unused string, fix disappearing tabs bug
This commit is contained in:
parent
7e454a17ba
commit
53ccae347d
@ -1901,8 +1901,12 @@ public class GBApplication extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String newPrefValue;
|
final String newPrefValue;
|
||||||
if (!StringUtils.isBlank(chartsTabsValue) && !chartsTabsValue.contains("respiratoryrate")) {
|
if (!StringUtils.isBlank(chartsTabsValue)) {
|
||||||
newPrefValue = chartsTabsValue + ",respiratoryrate";
|
if (!chartsTabsValue.contains("respiratoryrate")) {
|
||||||
|
newPrefValue = chartsTabsValue + ",respiratoryrate";
|
||||||
|
} else {
|
||||||
|
newPrefValue = chartsTabsValue;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
newPrefValue = "respiratoryrate";
|
newPrefValue = "respiratoryrate";
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ public class ActivityChartsActivity extends AbstractChartsActivity {
|
|||||||
case "calories":
|
case "calories":
|
||||||
return getString(R.string.calories);
|
return getString(R.string.calories);
|
||||||
case "respiratoryrate":
|
case "respiratoryrate":
|
||||||
return getString(R.string.respiratoryRate);
|
return getString(R.string.respiratoryrate);
|
||||||
}
|
}
|
||||||
|
|
||||||
return String.format(Locale.getDefault(), "Unknown %d", position);
|
return String.format(Locale.getDefault(), "Unknown %d", position);
|
||||||
|
@ -69,7 +69,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return getString(R.string.respiratoryRate);
|
return getString(R.string.respiratoryrate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -100,7 +100,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
|||||||
// Chart
|
// Chart
|
||||||
final List<LegendEntry> legendEntries = new ArrayList<>(1);
|
final List<LegendEntry> legendEntries = new ArrayList<>(1);
|
||||||
final LegendEntry respiratoryRateEntry = new LegendEntry();
|
final LegendEntry respiratoryRateEntry = new LegendEntry();
|
||||||
respiratoryRateEntry.label = getString(R.string.respiratoryRate);
|
respiratoryRateEntry.label = getString(R.string.respiratoryrate);
|
||||||
respiratoryRateEntry.formColor = getResources().getColor(R.color.respiratory_rate_color);
|
respiratoryRateEntry.formColor = getResources().getColor(R.color.respiratory_rate_color);
|
||||||
legendEntries.add(respiratoryRateEntry);
|
legendEntries.add(respiratoryRateEntry);
|
||||||
respiratoryRateChart.getLegend().setTextColor(TEXT_COLOR);
|
respiratoryRateChart.getLegend().setTextColor(TEXT_COLOR);
|
||||||
@ -137,7 +137,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
|||||||
yAxisLeft.setAxisMaximum(Math.max(respiratoryRateDay.rateHighest + 3, 20));
|
yAxisLeft.setAxisMaximum(Math.max(respiratoryRateDay.rateHighest + 3, 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
final LineDataSet lineDataSet = new LineDataSet(lineEntries, getString(R.string.respiratoryRate));
|
final LineDataSet lineDataSet = new LineDataSet(lineEntries, getString(R.string.respiratoryrate));
|
||||||
lineDataSet.setColor(getResources().getColor(R.color.respiratory_rate_color));
|
lineDataSet.setColor(getResources().getColor(R.color.respiratory_rate_color));
|
||||||
lineDataSet.setDrawCircles(false);
|
lineDataSet.setDrawCircles(false);
|
||||||
lineDataSet.setLineWidth(2f);
|
lineDataSet.setLineWidth(2f);
|
||||||
@ -154,7 +154,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected LineDataSet createDataSet(final List<Entry> values) {
|
protected LineDataSet createDataSet(final List<Entry> values) {
|
||||||
final LineDataSet lineDataSet = new LineDataSet(values, getString(R.string.respiratoryRate));
|
final LineDataSet lineDataSet = new LineDataSet(values, getString(R.string.respiratoryrate));
|
||||||
lineDataSet.setColor(getResources().getColor(R.color.respiratory_rate_color));
|
lineDataSet.setColor(getResources().getColor(R.color.respiratory_rate_color));
|
||||||
lineDataSet.setDrawCircles(false);
|
lineDataSet.setDrawCircles(false);
|
||||||
lineDataSet.setLineWidth(2f);
|
lineDataSet.setLineWidth(2f);
|
||||||
|
@ -30,7 +30,7 @@ abstract class RespiratoryRateFragment<T extends ChartsData> extends AbstractCha
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return getString(R.string.respiratoryRate);
|
return getString(R.string.respiratoryrate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -8,16 +8,11 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.github.mikephil.charting.charts.BarChart;
|
|
||||||
import com.github.mikephil.charting.charts.Chart;
|
import com.github.mikephil.charting.charts.Chart;
|
||||||
import com.github.mikephil.charting.charts.LineChart;
|
import com.github.mikephil.charting.charts.LineChart;
|
||||||
import com.github.mikephil.charting.components.LegendEntry;
|
import com.github.mikephil.charting.components.LegendEntry;
|
||||||
import com.github.mikephil.charting.components.LimitLine;
|
|
||||||
import com.github.mikephil.charting.components.XAxis;
|
import com.github.mikephil.charting.components.XAxis;
|
||||||
import com.github.mikephil.charting.components.YAxis;
|
import com.github.mikephil.charting.components.YAxis;
|
||||||
import com.github.mikephil.charting.data.BarData;
|
|
||||||
import com.github.mikephil.charting.data.BarDataSet;
|
|
||||||
import com.github.mikephil.charting.data.BarEntry;
|
|
||||||
import com.github.mikephil.charting.data.Entry;
|
import com.github.mikephil.charting.data.Entry;
|
||||||
import com.github.mikephil.charting.data.LineData;
|
import com.github.mikephil.charting.data.LineData;
|
||||||
import com.github.mikephil.charting.data.LineDataSet;
|
import com.github.mikephil.charting.data.LineDataSet;
|
||||||
@ -119,7 +114,7 @@ public class RespiratoryRatePeriodFragment extends RespiratoryRateFragment<Respi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return getString(R.string.respiratoryRate);
|
return getString(R.string.respiratoryrate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3114,7 +3114,7 @@
|
|||||||
<item>@string/menuitem_temperature</item>
|
<item>@string/menuitem_temperature</item>
|
||||||
<item>@string/menuitem_weight</item>
|
<item>@string/menuitem_weight</item>
|
||||||
<item>@string/watchface_widget_type_calories</item>
|
<item>@string/watchface_widget_type_calories</item>
|
||||||
<item>@string/respiratoryRate</item>
|
<item>@string/respiratoryrate</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="pref_charts_tabs_values">
|
<string-array name="pref_charts_tabs_values">
|
||||||
|
@ -2190,7 +2190,6 @@
|
|||||||
<string name="maxAltitude">Maximum</string>
|
<string name="maxAltitude">Maximum</string>
|
||||||
<string name="minAltitude">Minimum</string>
|
<string name="minAltitude">Minimum</string>
|
||||||
<string name="averageAltitude">Average</string>
|
<string name="averageAltitude">Average</string>
|
||||||
<string name="respiratoryRate">Respiratory Rate</string>
|
|
||||||
<string name="steps">Steps</string>
|
<string name="steps">Steps</string>
|
||||||
<string name="steps_avg">Steps AVG</string>
|
<string name="steps_avg">Steps AVG</string>
|
||||||
<string name="steps_total">Steps Total</string>
|
<string name="steps_total">Steps Total</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user