diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java index 7383f2b3c9..51534e207e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java @@ -1122,7 +1122,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, double lastLineBasal = 0; double lastBaseBasal = 0; double lastTempBasal = 0; - for (long time = fromTime; time < now; time += 5 * 60 * 1000L) { + for (long time = fromTime; time < now; time += 1 * 60 * 1000L) { TemporaryBasal tb = MainApp.getConfigBuilder().getTempBasal(time); double baseBasalValue = profile.getBasal(NSProfile.secondsFromMidnight(new Date(time))); double baseLineValue = baseBasalValue; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsExtendedBolusesFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsExtendedBolusesFragment.java index cb1c107980..4c5c308883 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsExtendedBolusesFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsExtendedBolusesFragment.java @@ -63,7 +63,7 @@ public class TreatmentsExtendedBolusesFragment extends Fragment { ExtendedBolus extendedBolus = extendedBolusList.getReversed(position); if (extendedBolus.isEndingEvent()) { holder.date.setText(DateUtil.dateAndTimeString(extendedBolus.date)); - holder.duration.setText(MainApp.sResources.getString(R.string.stopevent)); + holder.duration.setText(MainApp.sResources.getString(R.string.cancel)); holder.insulin.setText(""); holder.realDuration.setText(""); holder.iob.setText(""); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTempTargetFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTempTargetFragment.java index 95faa5c47c..8dc5e184ac 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTempTargetFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTempTargetFragment.java @@ -64,8 +64,8 @@ public class TreatmentsTempTargetFragment extends Fragment implements View.OnCli public void onBindViewHolder(TempTargetsViewHolder holder, int position) { NSProfile profile = ConfigBuilderPlugin.getActiveProfile().getProfile(); if (profile == null) return; - TempTarget tempTarget = tempTargetList.get(position); - if (tempTarget.durationInMinutes != 0) { + TempTarget tempTarget = tempTargetList.getReversed(position); + if (!tempTarget.isEndingEvent()) { holder.date.setText(DateUtil.dateAndTimeString(tempTarget.date) + " - " + DateUtil.timeString(tempTargetList.get(position).originalEnd())); holder.duration.setText(DecimalFormatter.to0Decimal(tempTarget.durationInMinutes) + " min"); holder.low.setText(tempTarget.lowValueToUnitsToString(profile.getUnits())); @@ -81,9 +81,9 @@ public class TreatmentsTempTargetFragment extends Fragment implements View.OnCli holder.reasonColon.setText(""); } if (tempTarget.isInProgress()) - holder.dateLinearLayout.setBackgroundColor(ContextCompat.getColor(MainApp.instance(), R.color.colorInProgress)); + holder.date.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive)); else - holder.dateLinearLayout.setBackgroundColor(ContextCompat.getColor(MainApp.instance(), R.color.cardColorBackground)); + holder.date.setTextColor(holder.reasonColon.getCurrentTextColor()); holder.remove.setTag(tempTarget); } @@ -107,7 +107,6 @@ public class TreatmentsTempTargetFragment extends Fragment implements View.OnCli TextView reasonLabel; TextView reasonColon; TextView remove; - LinearLayout dateLinearLayout; TempTargetsViewHolder(View itemView) { super(itemView); @@ -122,7 +121,6 @@ public class TreatmentsTempTargetFragment extends Fragment implements View.OnCli remove = (TextView) itemView.findViewById(R.id.temptargetrange_remove); remove.setOnClickListener(this); remove.setPaintFlags(remove.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); - dateLinearLayout = (LinearLayout) itemView.findViewById(R.id.temptargetrange_datelinearlayout); } @Override diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTemporaryBasalsFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTemporaryBasalsFragment.java index a0ac9749e1..9c78cf84e2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTemporaryBasalsFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/TreatmentsFromHistory/fragments/TreatmentsTemporaryBasalsFragment.java @@ -65,7 +65,7 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment { TemporaryBasal tempBasal = tempBasalList.getReversed(position); if (tempBasal.isEndingEvent()) { holder.date.setText(DateUtil.dateAndTimeString(tempBasal.date)); - holder.duration.setText(MainApp.sResources.getString(R.string.stopevent)); + holder.duration.setText(MainApp.sResources.getString(R.string.cancel)); holder.absolute.setText(""); holder.percent.setText(""); holder.realDuration.setText(""); diff --git a/app/src/main/res/layout/treatments_temptarget_item.xml b/app/src/main/res/layout/treatments_temptarget_item.xml index 25f941f0ec..87d61ee289 100644 --- a/app/src/main/res/layout/treatments_temptarget_item.xml +++ b/app/src/main/res/layout/treatments_temptarget_item.xml @@ -5,10 +5,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" - card_view:cardBackgroundColor="@color/cardColorBackground" - card_view:cardCornerRadius="6dp" - card_view:cardUseCompatPadding="true" - card_view:contentPadding="6dp"> + card_view:cardBackgroundColor="?android:colorBackground"> + android:text="{fa-clock-o}" /> + android:textAppearance="?android:attr/textAppearanceSmall" /> + android:textAppearance="?android:attr/textAppearanceSmall" /> + android:textAppearance="?android:attr/textAppearanceSmall" /> + android:textAppearance="?android:attr/textAppearanceSmall" /> + android:textAppearance="?android:attr/textAppearanceSmall" /> @@ -105,21 +95,32 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" + android:layout_weight="1" android:paddingRight="10dp" android:text="Activity" - android:layout_weight="1" android:textStyle="bold" /> + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index adc74bee76..3b9361fe2b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -612,7 +612,6 @@ ns_noupload Basal Step Bolus Step - STOP ExtendedBolus TempTarget