Minor tweaks.
This commit is contained in:
parent
c11086d9ea
commit
02af439dd7
3 changed files with 5 additions and 4 deletions
|
@ -23,7 +23,7 @@
|
||||||
- [ ] TDD
|
- [ ] TDD
|
||||||
- [x] Read
|
- [x] Read
|
||||||
- [ ] Sync DB?
|
- [ ] Sync DB?
|
||||||
- [ ] Display in UI
|
- [x] Display in UI
|
||||||
- [ ] Taking over alerts
|
- [ ] Taking over alerts
|
||||||
- [ ] On connect
|
- [ ] On connect
|
||||||
- [ ] During bolusing
|
- [ ] During bolusing
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ComboErrorHistoryDialog extends DialogFragment {
|
||||||
text = (TextView) layout.findViewById(R.id.combo_error_history_text);
|
text = (TextView) layout.findViewById(R.id.combo_error_history_text);
|
||||||
List<PumpError> errors = ComboPlugin.getPlugin().getPump().history.pumpErrorHistory;
|
List<PumpError> errors = ComboPlugin.getPlugin().getPump().history.pumpErrorHistory;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM HH:mm");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM. HH:mm");
|
||||||
if (errors.isEmpty()) {
|
if (errors.isEmpty()) {
|
||||||
text.setText("No errors. To retrieve the error history from the pump, long press the Refresh button.");
|
text.setText("No errors. To retrieve the error history from the pump, long press the Refresh button.");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -31,14 +31,15 @@ public class ComboTddHistoryDialog extends DialogFragment {
|
||||||
text = (TextView) layout.findViewById(R.id.combo_tdd_history_text);
|
text = (TextView) layout.findViewById(R.id.combo_tdd_history_text);
|
||||||
List<Tdd> tdds = ComboPlugin.getPlugin().getPump().history.tddHistory;
|
List<Tdd> tdds = ComboPlugin.getPlugin().getPump().history.tddHistory;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM.");
|
||||||
if (tdds.isEmpty()) {
|
if (tdds.isEmpty()) {
|
||||||
text.setText("No TDDs. To retrieve the TDD history from the pump, long press the Refresh button.");
|
text.setText("No TDDs. To retrieve the TDD history from the pump, long press the Refresh button.");
|
||||||
} else {
|
} else {
|
||||||
for (Tdd tdd : tdds) {
|
for (Tdd tdd : tdds) {
|
||||||
sb.append(simpleDateFormat.format(tdd.timestamp));
|
sb.append(simpleDateFormat.format(tdd.timestamp));
|
||||||
sb.append(" ");
|
sb.append(" ");
|
||||||
sb.append(tdd.total);
|
sb.append(String.format("%.1f", tdd.total));
|
||||||
|
sb.append(" U");
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
text.setText(sb.toString());
|
text.setText(sb.toString());
|
||||||
|
|
Loading…
Reference in a new issue