Combo tab: we have set a TBR duration, we're not showing how much time is remaing, but what has been set.

This commit is contained in:
Johannes Mockenhaupt 2017-07-17 16:41:37 +02:00
parent e9fa9b1788
commit 7fa59c6c16
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 6 additions and 6 deletions

View file

@ -33,7 +33,7 @@ public class ComboFragment extends Fragment implements View.OnClickListener {
private Button refresh;
private TextView status;
private TextView tbrPercentage;
private TextView tbrDurationRemaining;
private TextView tbrDuration;
private TextView tbrRate;
private TextView lastCmd;
private TextView lastCmdTime;
@ -47,7 +47,7 @@ public class ComboFragment extends Fragment implements View.OnClickListener {
refresh = (Button) view.findViewById(R.id.combo_refresh);
status = (TextView) view.findViewById(R.id.combo_status);
tbrPercentage = (TextView) view.findViewById(R.id.combo_tbr_percentage);
tbrDurationRemaining = (TextView) view.findViewById(R.id.combo_tbr_duration_remaining);
tbrDuration = (TextView) view.findViewById(R.id.combo_tbr_duration);
tbrRate = (TextView) view.findViewById(R.id.combo_tbr_rate);
lastCmd = (TextView) view.findViewById(R.id.combo_last_command);
lastCmdTime = (TextView) view.findViewById(R.id.combo_last_command_time);
@ -103,11 +103,11 @@ public class ComboFragment extends Fragment implements View.OnClickListener {
boolean tbrActive = ps.tbrPercent != -1 && ps.tbrPercent != 100;
if (tbrActive) {
tbrPercentage.setText("" + ps.tbrPercent + "%");
tbrDurationRemaining.setText("" + ps.tbrRemainingDuration + " min");
tbrDuration.setText("" + ps.tbrRemainingDuration + " min");
tbrRate.setText("" + ps.tbrRate + " U/h");
} else {
tbrPercentage.setText("Default basal rate running");
tbrDurationRemaining.setText("");
tbrDuration.setText("");
tbrRate.setText("" + getPlugin().getBaseBasalRate() + " U/h");
}
if (getPlugin().lastCmd != null) {

View file

@ -122,7 +122,7 @@
android:layout_weight="2"
android:gravity="end"
android:paddingRight="5dp"
android:text="TBR duration remaining"
android:text="TBR duration"
android:textSize="14sp" />
<TextView
@ -136,7 +136,7 @@
android:textSize="14sp" />
<TextView
android:id="@+id/combo_tbr_duration_remaining"
android:id="@+id/combo_tbr_duration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"