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;
|
||||
if (!StringUtils.isBlank(chartsTabsValue) && !chartsTabsValue.contains("respiratoryrate")) {
|
||||
newPrefValue = chartsTabsValue + ",respiratoryrate";
|
||||
if (!StringUtils.isBlank(chartsTabsValue)) {
|
||||
if (!chartsTabsValue.contains("respiratoryrate")) {
|
||||
newPrefValue = chartsTabsValue + ",respiratoryrate";
|
||||
} else {
|
||||
newPrefValue = chartsTabsValue;
|
||||
}
|
||||
} else {
|
||||
newPrefValue = "respiratoryrate";
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ public class ActivityChartsActivity extends AbstractChartsActivity {
|
||||
case "calories":
|
||||
return getString(R.string.calories);
|
||||
case "respiratoryrate":
|
||||
return getString(R.string.respiratoryRate);
|
||||
return getString(R.string.respiratoryrate);
|
||||
}
|
||||
|
||||
return String.format(Locale.getDefault(), "Unknown %d", position);
|
||||
|
@ -69,7 +69,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return getString(R.string.respiratoryRate);
|
||||
return getString(R.string.respiratoryrate);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -100,7 +100,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
||||
// Chart
|
||||
final List<LegendEntry> legendEntries = new ArrayList<>(1);
|
||||
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);
|
||||
legendEntries.add(respiratoryRateEntry);
|
||||
respiratoryRateChart.getLegend().setTextColor(TEXT_COLOR);
|
||||
@ -137,7 +137,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
||||
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.setDrawCircles(false);
|
||||
lineDataSet.setLineWidth(2f);
|
||||
@ -154,7 +154,7 @@ public class RespiratoryRateDailyFragment extends RespiratoryRateFragment<Respir
|
||||
}
|
||||
|
||||
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.setDrawCircles(false);
|
||||
lineDataSet.setLineWidth(2f);
|
||||
|
@ -30,7 +30,7 @@ abstract class RespiratoryRateFragment<T extends ChartsData> extends AbstractCha
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return getString(R.string.respiratoryRate);
|
||||
return getString(R.string.respiratoryrate);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,16 +8,11 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.github.mikephil.charting.charts.BarChart;
|
||||
import com.github.mikephil.charting.charts.Chart;
|
||||
import com.github.mikephil.charting.charts.LineChart;
|
||||
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.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.LineData;
|
||||
import com.github.mikephil.charting.data.LineDataSet;
|
||||
@ -119,7 +114,7 @@ public class RespiratoryRatePeriodFragment extends RespiratoryRateFragment<Respi
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return getString(R.string.respiratoryRate);
|
||||
return getString(R.string.respiratoryrate);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3114,7 +3114,7 @@
|
||||
<item>@string/menuitem_temperature</item>
|
||||
<item>@string/menuitem_weight</item>
|
||||
<item>@string/watchface_widget_type_calories</item>
|
||||
<item>@string/respiratoryRate</item>
|
||||
<item>@string/respiratoryrate</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_charts_tabs_values">
|
||||
|
@ -2190,7 +2190,6 @@
|
||||
<string name="maxAltitude">Maximum</string>
|
||||
<string name="minAltitude">Minimum</string>
|
||||
<string name="averageAltitude">Average</string>
|
||||
<string name="respiratoryRate">Respiratory Rate</string>
|
||||
<string name="steps">Steps</string>
|
||||
<string name="steps_avg">Steps AVG</string>
|
||||
<string name="steps_total">Steps Total</string>
|
||||
|
Loading…
Reference in New Issue
Block a user