1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-04 01:09:47 +01:00

Translate strings, remove unused variable

This commit is contained in:
cpfeiffer 2015-11-09 23:16:53 +01:00
parent 193d74879a
commit d9722c6db2
2 changed files with 5 additions and 4 deletions

View File

@ -64,7 +64,6 @@ public class SleepChartFragment extends AbstractChartFragment {
List<Integer> colors = new ArrayList<>();
int index = 0;
for (ActivityAmount amount : amounts.getAmounts()) {
long value = amount.getTotalSeconds();
entries.add(new Entry(amount.getTotalSeconds(), index++));
colors.add(getColorFor(amount.getActivityKind()));
data.addXValue(amount.getName(getActivity()));

View File

@ -2,6 +2,8 @@ package nodomain.freeyourgadget.gadgetbridge.model;
import android.content.Context;
import nodomain.freeyourgadget.gadgetbridge.R;
public class ActivityAmount {
private int activityKind;
private short percent;
@ -34,10 +36,10 @@ public class ActivityAmount {
public String getName(Context context) {
switch (activityKind) {
case ActivityKind.TYPE_DEEP_SLEEP:
return "Deep Sleep";
return context.getString(R.string.abstract_chart_fragment_kind_deep_sleep);
case ActivityKind.TYPE_LIGHT_SLEEP:
return "Light Sleep";
return context.getString(R.string.abstract_chart_fragment_kind_light_sleep);
}
return "Activity";
return context.getString(R.string.abstract_chart_fragment_kind_activity);
}
}