boluses working
This commit is contained in:
parent
6cd046459a
commit
6394421017
12 changed files with 62 additions and 64 deletions
|
@ -377,7 +377,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
|
|
||||||
// -------------------- TREATMENT HANDLING -------------------
|
// -------------------- TREATMENT HANDLING -------------------
|
||||||
|
|
||||||
public boolean affectingIobCob(Treatment t) {
|
public boolean changeAffectingIobCob(Treatment t) {
|
||||||
Treatment existing = findTreatmentByTimeIndex(t.date);
|
Treatment existing = findTreatmentByTimeIndex(t.date);
|
||||||
if (existing == null)
|
if (existing == null)
|
||||||
return true;
|
return true;
|
||||||
|
@ -387,9 +387,10 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int update(Treatment treatment) {
|
public int update(Treatment treatment) {
|
||||||
|
treatment.date = treatment.date - treatment.date % 1000;
|
||||||
int updated = 0;
|
int updated = 0;
|
||||||
try {
|
try {
|
||||||
boolean historyChange = affectingIobCob(treatment);
|
boolean historyChange = changeAffectingIobCob(treatment);
|
||||||
updated = getDaoTreatments().update(treatment);
|
updated = getDaoTreatments().update(treatment);
|
||||||
if (historyChange)
|
if (historyChange)
|
||||||
latestTreatmentChange = treatment.date;
|
latestTreatmentChange = treatment.date;
|
||||||
|
@ -401,9 +402,10 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dao.CreateOrUpdateStatus createOrUpdate(Treatment treatment) {
|
public Dao.CreateOrUpdateStatus createOrUpdate(Treatment treatment) {
|
||||||
|
treatment.date = treatment.date - treatment.date % 1000;
|
||||||
Dao.CreateOrUpdateStatus status = null;
|
Dao.CreateOrUpdateStatus status = null;
|
||||||
try {
|
try {
|
||||||
boolean historyChange = affectingIobCob(treatment);
|
boolean historyChange = changeAffectingIobCob(treatment);
|
||||||
status = getDaoTreatments().createOrUpdate(treatment);
|
status = getDaoTreatments().createOrUpdate(treatment);
|
||||||
if (historyChange)
|
if (historyChange)
|
||||||
latestTreatmentChange = treatment.date;
|
latestTreatmentChange = treatment.date;
|
||||||
|
@ -415,6 +417,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void create(Treatment treatment) {
|
public void create(Treatment treatment) {
|
||||||
|
treatment.date = treatment.date - treatment.date % 1000;
|
||||||
try {
|
try {
|
||||||
getDaoTreatments().create(treatment);
|
getDaoTreatments().create(treatment);
|
||||||
latestTreatmentChange = treatment.date;
|
latestTreatmentChange = treatment.date;
|
||||||
|
@ -511,12 +514,12 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
scheduledTratmentPost = null;
|
scheduledTratmentPost = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// prepare task for execution in 5 sec
|
// prepare task for execution in 1 sec
|
||||||
// cancel waiting task to prevent sending multiple posts
|
// cancel waiting task to prevent sending multiple posts
|
||||||
if (scheduledTratmentPost != null)
|
if (scheduledTratmentPost != null)
|
||||||
scheduledTratmentPost.cancel(false);
|
scheduledTratmentPost.cancel(false);
|
||||||
Runnable task = new PostRunnable();
|
Runnable task = new PostRunnable();
|
||||||
final int sec = 5;
|
final int sec = 1;
|
||||||
scheduledTratmentPost = treatmentsWorker.schedule(task, sec, TimeUnit.SECONDS);
|
scheduledTratmentPost = treatmentsWorker.schedule(task, sec, TimeUnit.SECONDS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -708,6 +711,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void create(TemporaryBasal tempBasal) {
|
public void create(TemporaryBasal tempBasal) {
|
||||||
|
tempBasal.date = tempBasal.date - tempBasal.date % 1000;
|
||||||
try {
|
try {
|
||||||
getDaoTemporaryBasal().create(tempBasal);
|
getDaoTemporaryBasal().create(tempBasal);
|
||||||
latestTreatmentChange = tempBasal.date;
|
latestTreatmentChange = tempBasal.date;
|
||||||
|
@ -750,12 +754,12 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
scheduledTemBasalsPost = null;
|
scheduledTemBasalsPost = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// prepare task for execution in 5 sec
|
// prepare task for execution in 1 sec
|
||||||
// cancel waiting task to prevent sending multiple posts
|
// cancel waiting task to prevent sending multiple posts
|
||||||
if (scheduledTemBasalsPost != null)
|
if (scheduledTemBasalsPost != null)
|
||||||
scheduledTemBasalsPost.cancel(false);
|
scheduledTemBasalsPost.cancel(false);
|
||||||
Runnable task = new PostRunnable();
|
Runnable task = new PostRunnable();
|
||||||
final int sec = 5;
|
final int sec = 1;
|
||||||
scheduledTemBasalsPost = tempBasalsWorker.schedule(task, sec, TimeUnit.SECONDS);
|
scheduledTemBasalsPost = tempBasalsWorker.schedule(task, sec, TimeUnit.SECONDS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -817,12 +821,12 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
scheduledExtendedBolusPost = null;
|
scheduledExtendedBolusPost = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// prepare task for execution in 5 sec
|
// prepare task for execution in 1 sec
|
||||||
// cancel waiting task to prevent sending multiple posts
|
// cancel waiting task to prevent sending multiple posts
|
||||||
if (scheduledExtendedBolusPost != null)
|
if (scheduledExtendedBolusPost != null)
|
||||||
scheduledExtendedBolusPost.cancel(false);
|
scheduledExtendedBolusPost.cancel(false);
|
||||||
Runnable task = new PostRunnable();
|
Runnable task = new PostRunnable();
|
||||||
final int sec = 5;
|
final int sec = 1;
|
||||||
scheduledExtendedBolusPost = extendedBolusWorker.schedule(task, sec, TimeUnit.SECONDS);
|
scheduledExtendedBolusPost = extendedBolusWorker.schedule(task, sec, TimeUnit.SECONDS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class Treatment implements DataPointWithLabelInterface {
|
||||||
public String log() {
|
public String log() {
|
||||||
return "Treatment{" +
|
return "Treatment{" +
|
||||||
"date= " + date +
|
"date= " + date +
|
||||||
"date= " + DateUtil.dateAndTimeString(date) +
|
", date= " + DateUtil.dateAndTimeString(date) +
|
||||||
", isValid= " + isValid +
|
", isValid= " + isValid +
|
||||||
", _id= " + _id +
|
", _id= " + _id +
|
||||||
", insulin= " + insulin +
|
", insulin= " + insulin +
|
||||||
|
|
|
@ -504,25 +504,15 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
Treatment t = new Treatment(insulinType);
|
Treatment t = new Treatment(insulinType);
|
||||||
t.insulin = result.bolusDelivered;
|
t.insulin = result.bolusDelivered;
|
||||||
t.carbs = (double) result.carbsDelivered;
|
t.carbs = (double) result.carbsDelivered;
|
||||||
t.date = new Date().getDate();
|
t.date = new Date().getTime();
|
||||||
t.mealBolus = t.carbs > 0;
|
t.mealBolus = t.carbs > 0;
|
||||||
MainApp.getDbHelper().create(t);
|
MainApp.getDbHelper().create(t);
|
||||||
t.sendToNSClient();
|
t.sendToNSClient();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Config.logCongigBuilderActions)
|
log.error("activePump==null");
|
||||||
log.debug("Creating treatment: " + insulin + " carbs: " + carbs);
|
|
||||||
Treatment t = new Treatment(insulinType);
|
|
||||||
t.insulin = insulin;
|
|
||||||
t.carbs = (double) carbs;
|
|
||||||
t.date = new Date().getDate();
|
|
||||||
t.mealBolus = t.carbs > 0;
|
|
||||||
MainApp.getDbHelper().create(t);
|
|
||||||
t.sendToNSClient();
|
|
||||||
result = new PumpEnactResult();
|
result = new PumpEnactResult();
|
||||||
result.success = true;
|
result.success = false;
|
||||||
result.bolusDelivered = insulin;
|
|
||||||
result.carbsDelivered = carbs;
|
|
||||||
}
|
}
|
||||||
mWakeLock.release();
|
mWakeLock.release();
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -221,7 +221,6 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.logPumpComm)
|
if (Config.logPumpComm)
|
||||||
log.debug("Delivering treatment insulin: " + insulin + "U carbs: " + carbs + "g " + result);
|
log.debug("Delivering treatment insulin: " + insulin + "U carbs: " + carbs + "g " + result);
|
||||||
MainApp.bus().post(new EventVirtualPumpUpdateGui());
|
MainApp.bus().post(new EventVirtualPumpUpdateGui());
|
||||||
|
|
|
@ -16,7 +16,6 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.Answers;
|
import com.crashlytics.android.answers.Answers;
|
||||||
|
@ -34,6 +33,7 @@ import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.Services.Intents;
|
import info.nightscout.androidaps.Services.Intents;
|
||||||
import info.nightscout.androidaps.data.Iob;
|
import info.nightscout.androidaps.data.Iob;
|
||||||
import info.nightscout.androidaps.db.Treatment;
|
import info.nightscout.androidaps.db.Treatment;
|
||||||
|
import info.nightscout.androidaps.events.EventNewBG;
|
||||||
import info.nightscout.androidaps.events.EventTreatmentChange;
|
import info.nightscout.androidaps.events.EventTreatmentChange;
|
||||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSProfile;
|
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSProfile;
|
||||||
|
@ -65,7 +65,7 @@ public class TreatmentsBolusFragment extends Fragment implements View.OnClickLis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TreatmentsViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
|
public TreatmentsViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
|
||||||
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.treatments_item, viewGroup, false);
|
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.treatments_bolus_item, viewGroup, false);
|
||||||
return new TreatmentsViewHolder(v);
|
return new TreatmentsViewHolder(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,9 +84,9 @@ public class TreatmentsBolusFragment extends Fragment implements View.OnClickLis
|
||||||
holder.activity.setText(DecimalFormatter.to3Decimal(iob.activityContrib) + " U");
|
holder.activity.setText(DecimalFormatter.to3Decimal(iob.activityContrib) + " U");
|
||||||
holder.mealOrCorrection.setText(treatments.get(position).mealBolus ? MainApp.sResources.getString(R.string.mealbolus) : MainApp.sResources.getString(R.string.correctionbous));
|
holder.mealOrCorrection.setText(treatments.get(position).mealBolus ? MainApp.sResources.getString(R.string.mealbolus) : MainApp.sResources.getString(R.string.correctionbous));
|
||||||
if (iob.iobContrib != 0)
|
if (iob.iobContrib != 0)
|
||||||
holder.dateLinearLayout.setBackgroundColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
|
holder.iob.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
|
||||||
else
|
else
|
||||||
holder.dateLinearLayout.setBackgroundColor(ContextCompat.getColor(MainApp.instance(), R.color.cardColorBackground));
|
holder.iob.setTextColor(holder.carbs.getCurrentTextColor());
|
||||||
holder.remove.setTag(treatments.get(position));
|
holder.remove.setTag(treatments.get(position));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@ public class TreatmentsBolusFragment extends Fragment implements View.OnClickLis
|
||||||
TextView iob;
|
TextView iob;
|
||||||
TextView activity;
|
TextView activity;
|
||||||
TextView mealOrCorrection;
|
TextView mealOrCorrection;
|
||||||
LinearLayout dateLinearLayout;
|
|
||||||
TextView remove;
|
TextView remove;
|
||||||
|
|
||||||
TreatmentsViewHolder(View itemView) {
|
TreatmentsViewHolder(View itemView) {
|
||||||
|
@ -120,7 +119,6 @@ public class TreatmentsBolusFragment extends Fragment implements View.OnClickLis
|
||||||
iob = (TextView) itemView.findViewById(R.id.treatments_iob);
|
iob = (TextView) itemView.findViewById(R.id.treatments_iob);
|
||||||
activity = (TextView) itemView.findViewById(R.id.treatments_activity);
|
activity = (TextView) itemView.findViewById(R.id.treatments_activity);
|
||||||
mealOrCorrection = (TextView) itemView.findViewById(R.id.treatments_mealorcorrection);
|
mealOrCorrection = (TextView) itemView.findViewById(R.id.treatments_mealorcorrection);
|
||||||
dateLinearLayout = (LinearLayout) itemView.findViewById(R.id.treatments_datelinearlayout);
|
|
||||||
remove = (TextView) itemView.findViewById(R.id.treatments_remove);
|
remove = (TextView) itemView.findViewById(R.id.treatments_remove);
|
||||||
remove.setOnClickListener(this);
|
remove.setOnClickListener(this);
|
||||||
remove.setPaintFlags(remove.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
remove.setPaintFlags(remove.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||||
|
@ -221,6 +219,11 @@ public class TreatmentsBolusFragment extends Fragment implements View.OnClickLis
|
||||||
updateGUI();
|
updateGUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onStatusEvent(final EventNewBG ev) {
|
||||||
|
updateGUI();
|
||||||
|
}
|
||||||
|
|
||||||
public void updateGUI() {
|
public void updateGUI() {
|
||||||
Activity activity = getActivity();
|
Activity activity = getActivity();
|
||||||
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||||
|
|
|
@ -14,7 +14,6 @@ import android.support.v7.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.Answers;
|
import com.crashlytics.android.answers.Answers;
|
||||||
|
@ -32,7 +31,6 @@ import info.nightscout.androidaps.data.IobTotal;
|
||||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||||
import info.nightscout.androidaps.events.EventNewBG;
|
import info.nightscout.androidaps.events.EventNewBG;
|
||||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||||
import info.nightscout.androidaps.plugins.TreatmentsFromHistory.TreatmentsFromHistoryPlugin;
|
|
||||||
import info.nightscout.utils.DateUtil;
|
import info.nightscout.utils.DateUtil;
|
||||||
import info.nightscout.utils.DecimalFormatter;
|
import info.nightscout.utils.DecimalFormatter;
|
||||||
import info.nightscout.utils.OverlappingIntervals;
|
import info.nightscout.utils.OverlappingIntervals;
|
||||||
|
@ -58,7 +56,7 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TempBasalsViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
|
public TempBasalsViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
|
||||||
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.tempbasals_item, viewGroup, false);
|
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.treatments_tempbasals_item, viewGroup, false);
|
||||||
return new TempBasalsViewHolder(v);
|
return new TempBasalsViewHolder(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,8 +85,12 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment {
|
||||||
holder.extendedFlag.setVisibility(View.GONE);
|
holder.extendedFlag.setVisibility(View.GONE);
|
||||||
if (tempBasal.isInProgress())
|
if (tempBasal.isInProgress())
|
||||||
holder.date.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
|
holder.date.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
|
||||||
|
else
|
||||||
|
holder.date.setTextColor(holder.netRatio.getCurrentTextColor());
|
||||||
if (tempBasal.iobCalc(new Date().getTime()).basaliob != 0)
|
if (tempBasal.iobCalc(new Date().getTime()).basaliob != 0)
|
||||||
holder.iob.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
|
holder.iob.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
|
||||||
|
else
|
||||||
|
holder.date.setTextColor(holder.netRatio.getCurrentTextColor());
|
||||||
holder.remove.setTag(tempBasal);
|
holder.remove.setTag(tempBasal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +164,7 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment {
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.tempbasals_fragment, container, false);
|
View view = inflater.inflate(R.layout.treatments_tempbasals_fragment, container, false);
|
||||||
|
|
||||||
recyclerView = (RecyclerView) view.findViewById(R.id.tempbasals_recyclerview);
|
recyclerView = (RecyclerView) view.findViewById(R.id.tempbasals_recyclerview);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.Treatments.fragments.TreatmentsBolusFragment">
|
tools:context=".plugins.TreatmentsFromHistory.fragments.TreatmentsBolusFragment">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -22,14 +22,15 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:text="@string/treatments_iobtotal_label_string"
|
android:text="@string/treatments_iobtotal_label_string"
|
||||||
android:textStyle="bold" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/treatments_iobtotal"
|
android:id="@+id/treatments_iobtotal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/treatments_iobactivitytotal_label"
|
android:id="@+id/treatments_iobactivitytotal_label"
|
||||||
|
@ -37,14 +38,15 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:text="@string/treatments_iobactivitytotal_label_string"
|
android:text="@string/treatments_iobactivitytotal_label_string"
|
||||||
android:textStyle="bold" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/treatments_iobactivitytotal"
|
android:id="@+id/treatments_iobactivitytotal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
card_view:cardBackgroundColor="@color/cardColorBackground"
|
card_view:cardBackgroundColor="?android:colorBackground">
|
||||||
card_view:cardCornerRadius="6dp"
|
|
||||||
card_view:cardUseCompatPadding="true"
|
|
||||||
card_view:contentPadding="6dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -16,7 +13,6 @@
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/treatments_datelinearlayout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:baselineAligned="true"
|
android:baselineAligned="true"
|
||||||
|
@ -28,29 +24,22 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="center_vertical|right"
|
android:gravity="center_vertical|right"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:text="{fa-clock-o}"
|
android:text="{fa-clock-o}" />
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:textColor="@color/cardItemLabel" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/treatments_date"
|
android:id="@+id/treatments_date"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="5dp"
|
android:paddingLeft="5dp" />
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:textColor="@color/cardItemLabel"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:text="Meal"
|
android:id="@+id/treatments_mealorcorrection"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/treatments_mealorcorrection"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Medium"
|
android:text="Meal"
|
||||||
android:textAlignment="textEnd"
|
android:textAlignment="textEnd" />
|
||||||
android:textColor="@color/mdtp_red"
|
|
||||||
android:layout_marginRight="5dp" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -138,6 +127,7 @@
|
||||||
android:id="@+id/treatments_remove"
|
android:id="@+id/treatments_remove"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/overview_quickwizard_item_remove_button"
|
android:text="@string/overview_quickwizard_item_remove_button"
|
||||||
android:textAlignment="viewEnd"
|
android:textAlignment="viewEnd"
|
||||||
|
@ -145,6 +135,16 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dip"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
|
@ -21,7 +21,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/treatments" />
|
android:text="@string/bolus" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/treatments_tempbasals"
|
android:id="@+id/treatments_tempbasals"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="info.nightscout.androidaps.plugins.Treatments.fragments.TreatmentsTempBasalsFragment">
|
tools:context="info.nightscout.androidaps.plugins.TreatmentsFromHistory.fragments.TreatmentsTemporaryBasalsFragment">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
|
@ -5,8 +5,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
card_view:cardBackgroundColor="?android:colorBackground"
|
card_view:cardBackgroundColor="?android:colorBackground">
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -162,9 +161,9 @@
|
||||||
android:id="@+id/tempbasals_remove"
|
android:id="@+id/tempbasals_remove"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/overview_quickwizard_item_remove_button"
|
android:text="@string/overview_quickwizard_item_remove_button"
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:textAlignment="viewEnd"
|
android:textAlignment="viewEnd"
|
||||||
android:textColor="@android:color/holo_orange_light" />
|
android:textColor="@android:color/holo_orange_light" />
|
||||||
|
|
||||||
|
@ -180,7 +179,6 @@
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
|
@ -32,7 +32,7 @@
|
||||||
<string name="treatments_iob_label_string">IOB:</string>
|
<string name="treatments_iob_label_string">IOB:</string>
|
||||||
<string name="sms_iob">IOB:</string>
|
<string name="sms_iob">IOB:</string>
|
||||||
<string name="treatments_activity_string">Activity:</string>
|
<string name="treatments_activity_string">Activity:</string>
|
||||||
<string name="treatments_iobtotal_label_string">Toal IOB:</string>
|
<string name="treatments_iobtotal_label_string">Total IOB:</string>
|
||||||
<string name="treatments_iobactivitytotal_label_string">Total IOB activity:</string>
|
<string name="treatments_iobactivitytotal_label_string">Total IOB activity:</string>
|
||||||
<string name="tempbasals_realduration_label_string">Dur:</string>
|
<string name="tempbasals_realduration_label_string">Dur:</string>
|
||||||
<string name="tempbasals_netratio_label_string">Ratio:</string>
|
<string name="tempbasals_netratio_label_string">Ratio:</string>
|
||||||
|
|
Loading…
Reference in a new issue