gui tweaking
This commit is contained in:
parent
1a4e60d3a8
commit
b40cf99201
17 changed files with 832 additions and 68 deletions
|
@ -41,6 +41,7 @@ public class Config {
|
||||||
public static final boolean logPumpActions = true;
|
public static final boolean logPumpActions = true;
|
||||||
public static final boolean logSMSComm = true;
|
public static final boolean logSMSComm = true;
|
||||||
public static final boolean logCongigBuilderActions = true;
|
public static final boolean logCongigBuilderActions = true;
|
||||||
|
public static final boolean logAutosensData = false;
|
||||||
|
|
||||||
// DanaR specific
|
// DanaR specific
|
||||||
public static final boolean logDanaBTComm = true;
|
public static final boolean logDanaBTComm = true;
|
||||||
|
|
|
@ -501,7 +501,8 @@ public class DataService extends IntentService {
|
||||||
if (trJson.has("eventType") && (
|
if (trJson.has("eventType") && (
|
||||||
trJson.getString("eventType").equals(CareportalEvent.SITECHANGE) ||
|
trJson.getString("eventType").equals(CareportalEvent.SITECHANGE) ||
|
||||||
trJson.getString("eventType").equals(CareportalEvent.INSULINCHANGE) ||
|
trJson.getString("eventType").equals(CareportalEvent.INSULINCHANGE) ||
|
||||||
trJson.getString("eventType").equals(CareportalEvent.SENSORCHANGE)
|
trJson.getString("eventType").equals(CareportalEvent.SENSORCHANGE) ||
|
||||||
|
trJson.getString("eventType").equals(CareportalEvent.PUMPBATTERYCHANGE)
|
||||||
)) {
|
)) {
|
||||||
if (Config.logIncommingData)
|
if (Config.logIncommingData)
|
||||||
log.debug("Processing CareportalEvent record: " + trJson.toString());
|
log.debug("Processing CareportalEvent record: " + trJson.toString());
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class CareportalEvent {
|
||||||
public static final String SITECHANGE = "Site Change";
|
public static final String SITECHANGE = "Site Change";
|
||||||
public static final String INSULINCHANGE = "Insulin Change";
|
public static final String INSULINCHANGE = "Insulin Change";
|
||||||
public static final String SENSORCHANGE = "Sensor Change";
|
public static final String SENSORCHANGE = "Sensor Change";
|
||||||
|
public static final String PUMPBATTERYCHANGE = "Pump Battery Change";
|
||||||
|
|
||||||
public CareportalEvent() {
|
public CareportalEvent() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class CareportalFragment extends Fragment implements View.OnClickListener
|
||||||
TextView iage;
|
TextView iage;
|
||||||
TextView cage;
|
TextView cage;
|
||||||
TextView sage;
|
TextView sage;
|
||||||
|
TextView pbage;
|
||||||
|
|
||||||
static public CareportalPlugin getPlugin() {
|
static public CareportalPlugin getPlugin() {
|
||||||
if (careportalPlugin == null) {
|
if (careportalPlugin == null) {
|
||||||
|
@ -34,25 +35,25 @@ public class CareportalFragment extends Fragment implements View.OnClickListener
|
||||||
}
|
}
|
||||||
|
|
||||||
// bg,insulin,carbs,prebolus,duration,percent,absolute,profile,split,temptarget
|
// bg,insulin,carbs,prebolus,duration,percent,absolute,profile,split,temptarget
|
||||||
final OptionsToShow bgcheck = new OptionsToShow(R.id.careportal_bgcheck, R.string.careportal_bgcheck, true, true, true, false, false, false, false, false, false, false);
|
static final OptionsToShow bgcheck = new OptionsToShow(R.id.careportal_bgcheck, R.string.careportal_bgcheck, true, true, true, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow snackbolus = new OptionsToShow(R.id.careportal_snackbolus, R.string.careportal_snackbolus, true, true, true, true, false, false, false, false, false, false);
|
static final OptionsToShow snackbolus = new OptionsToShow(R.id.careportal_snackbolus, R.string.careportal_snackbolus, true, true, true, true, false, false, false, false, false, false);
|
||||||
final OptionsToShow mealbolus = new OptionsToShow(R.id.careportal_mealbolus, R.string.careportal_mealbolus, true, true, true, true, false, false, false, false, false, false);
|
static final OptionsToShow mealbolus = new OptionsToShow(R.id.careportal_mealbolus, R.string.careportal_mealbolus, true, true, true, true, false, false, false, false, false, false);
|
||||||
final OptionsToShow correctionbolus = new OptionsToShow(R.id.careportal_correctionbolus, R.string.careportal_correctionbolus, true, true, true, true, false, false, false, false, false, false);
|
static final OptionsToShow correctionbolus = new OptionsToShow(R.id.careportal_correctionbolus, R.string.careportal_correctionbolus, true, true, true, true, false, false, false, false, false, false);
|
||||||
final OptionsToShow carbcorrection = new OptionsToShow(R.id.careportal_carbscorrection, R.string.careportal_carbscorrection, true, false, true, false, false, false, false, false, false, false);
|
static final OptionsToShow carbcorrection = new OptionsToShow(R.id.careportal_carbscorrection, R.string.careportal_carbscorrection, true, false, true, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow combobolus = new OptionsToShow(R.id.careportal_combobolus, R.string.careportal_combobolus, true, true, true, true, true, false, false, false, true, false);
|
static final OptionsToShow combobolus = new OptionsToShow(R.id.careportal_combobolus, R.string.careportal_combobolus, true, true, true, true, true, false, false, false, true, false);
|
||||||
final OptionsToShow announcement = new OptionsToShow(R.id.careportal_announcement, R.string.careportal_announcement, true, false, false, false, false, false, false, false, false, false);
|
static final OptionsToShow announcement = new OptionsToShow(R.id.careportal_announcement, R.string.careportal_announcement, true, false, false, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow note = new OptionsToShow(R.id.careportal_note, R.string.careportal_note, true, false, false, false, true, false, false, false, false, false);
|
static final OptionsToShow note = new OptionsToShow(R.id.careportal_note, R.string.careportal_note, true, false, false, false, true, false, false, false, false, false);
|
||||||
final OptionsToShow question = new OptionsToShow(R.id.careportal_question, R.string.careportal_question, true, false, false, false, false, false, false, false, false, false);
|
static final OptionsToShow question = new OptionsToShow(R.id.careportal_question, R.string.careportal_question, true, false, false, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow exercise = new OptionsToShow(R.id.careportal_exercise, R.string.careportal_exercise, false, false, false, false, true, false, false, false, false, false);
|
static final OptionsToShow exercise = new OptionsToShow(R.id.careportal_exercise, R.string.careportal_exercise, false, false, false, false, true, false, false, false, false, false);
|
||||||
final OptionsToShow sitechange = new OptionsToShow(R.id.careportal_pumpsitechange, R.string.careportal_pumpsitechange, true, true, false, false, false, false, false, false, false, false);
|
static final OptionsToShow sitechange = new OptionsToShow(R.id.careportal_pumpsitechange, R.string.careportal_pumpsitechange, true, true, false, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow sensorstart = new OptionsToShow(R.id.careportal_cgmsensorstart, R.string.careportal_cgmsensorstart, true, false, false, false, false, false, false, false, false, false);
|
static final OptionsToShow sensorstart = new OptionsToShow(R.id.careportal_cgmsensorstart, R.string.careportal_cgmsensorstart, true, false, false, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow sensorchange = new OptionsToShow(R.id.careportal_cgmsensorinsert, R.string.careportal_cgmsensorinsert, true, false, false, false, false, false, false, false, false, false);
|
static final OptionsToShow sensorchange = new OptionsToShow(R.id.careportal_cgmsensorinsert, R.string.careportal_cgmsensorinsert, true, false, false, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow insulinchange = new OptionsToShow(R.id.careportal_insulincartridgechange, R.string.careportal_insulincartridgechange, true, false, false, false, false, false, false, false, false, false);
|
static final OptionsToShow insulinchange = new OptionsToShow(R.id.careportal_insulincartridgechange, R.string.careportal_insulincartridgechange, true, false, false, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow tempbasalstart = new OptionsToShow(R.id.careportal_tempbasalstart, R.string.careportal_tempbasalstart, true, false, false, false, true, true, true, false, false, false);
|
static final OptionsToShow tempbasalstart = new OptionsToShow(R.id.careportal_tempbasalstart, R.string.careportal_tempbasalstart, true, false, false, false, true, true, true, false, false, false);
|
||||||
final OptionsToShow tempbasalend = new OptionsToShow(R.id.careportal_tempbasalend, R.string.careportal_tempbasalend, true, false, false, false, false, false, false, false, false, false);
|
static final OptionsToShow tempbasalend = new OptionsToShow(R.id.careportal_tempbasalend, R.string.careportal_tempbasalend, true, false, false, false, false, false, false, false, false, false);
|
||||||
final OptionsToShow profileswitch = new OptionsToShow(R.id.careportal_profileswitch, R.string.careportal_profileswitch, true, false, false, false, true, false, false, true, false, false);
|
static final OptionsToShow profileswitch = new OptionsToShow(R.id.careportal_profileswitch, R.string.careportal_profileswitch, true, false, false, false, true, false, false, true, false, false);
|
||||||
final OptionsToShow openapsoffline = new OptionsToShow(R.id.careportal_openapsoffline, R.string.careportal_openapsoffline, false, false, false, false, true, false, false, false, false, false);
|
static final OptionsToShow openapsoffline = new OptionsToShow(R.id.careportal_openapsoffline, R.string.careportal_openapsoffline, false, false, false, false, true, false, false, false, false, false);
|
||||||
final OptionsToShow temptarget = new OptionsToShow(R.id.careportal_temporarytarget, R.string.careportal_temporarytarget, false, false, false, false, true, false, false, false, false, true);
|
static final OptionsToShow temptarget = new OptionsToShow(R.id.careportal_temporarytarget, R.string.careportal_temporarytarget, false, false, false, false, true, false, false, false, false, true);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
@ -82,6 +83,7 @@ public class CareportalFragment extends Fragment implements View.OnClickListener
|
||||||
iage = (TextView) view.findViewById(R.id.careportal_insulinage);
|
iage = (TextView) view.findViewById(R.id.careportal_insulinage);
|
||||||
cage = (TextView) view.findViewById(R.id.careportal_canulaage);
|
cage = (TextView) view.findViewById(R.id.careportal_canulaage);
|
||||||
sage = (TextView) view.findViewById(R.id.careportal_sensorage);
|
sage = (TextView) view.findViewById(R.id.careportal_sensorage);
|
||||||
|
pbage = (TextView) view.findViewById(R.id.careportal_pbage);
|
||||||
|
|
||||||
updateGUI();
|
updateGUI();
|
||||||
return view;
|
return view;
|
||||||
|
@ -89,9 +91,12 @@ public class CareportalFragment extends Fragment implements View.OnClickListener
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
FragmentManager manager = getFragmentManager();
|
action(view.getId(), getFragmentManager());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void action(int id, FragmentManager manager) {
|
||||||
NewNSTreatmentDialog newDialog = new NewNSTreatmentDialog();
|
NewNSTreatmentDialog newDialog = new NewNSTreatmentDialog();
|
||||||
switch (view.getId()) {
|
switch (id) {
|
||||||
case R.id.careportal_bgcheck:
|
case R.id.careportal_bgcheck:
|
||||||
newDialog.setOptions(bgcheck);
|
newDialog.setOptions(bgcheck);
|
||||||
break;
|
break;
|
||||||
|
@ -175,19 +180,33 @@ public class CareportalFragment extends Fragment implements View.OnClickListener
|
||||||
|
|
||||||
void updateGUI() {
|
void updateGUI() {
|
||||||
Activity activity = getActivity();
|
Activity activity = getActivity();
|
||||||
|
updateAge(activity, sage, iage, cage, pbage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void updateAge(Activity activity, final TextView sage, final TextView iage, final TextView cage, final TextView pbage) {
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
activity.runOnUiThread(
|
activity.runOnUiThread(
|
||||||
new Runnable() {
|
new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
CareportalEvent careportalEvent;
|
CareportalEvent careportalEvent;
|
||||||
|
if (sage != null) {
|
||||||
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SENSORCHANGE);
|
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SENSORCHANGE);
|
||||||
sage.setText(careportalEvent != null ? careportalEvent.age() : MainApp.sResources.getString(R.string.notavailable));
|
sage.setText(careportalEvent != null ? careportalEvent.age() : MainApp.sResources.getString(R.string.notavailable));
|
||||||
|
}
|
||||||
|
if (iage != null) {
|
||||||
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.INSULINCHANGE);
|
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.INSULINCHANGE);
|
||||||
iage.setText(careportalEvent != null ? careportalEvent.age() : MainApp.sResources.getString(R.string.notavailable));
|
iage.setText(careportalEvent != null ? careportalEvent.age() : MainApp.sResources.getString(R.string.notavailable));
|
||||||
|
}
|
||||||
|
if (cage != null) {
|
||||||
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SITECHANGE);
|
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SITECHANGE);
|
||||||
cage.setText(careportalEvent != null ? careportalEvent.age() : MainApp.sResources.getString(R.string.notavailable));
|
cage.setText(careportalEvent != null ? careportalEvent.age() : MainApp.sResources.getString(R.string.notavailable));
|
||||||
}
|
}
|
||||||
|
if (pbage != null) {
|
||||||
|
careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.PUMPBATTERYCHANGE);
|
||||||
|
pbage.setText(careportalEvent != null ? careportalEvent.age() : MainApp.sResources.getString(R.string.notavailable));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,4 +21,8 @@ public class AutosensData {
|
||||||
return "AutosensData: " + new Date(time).toLocaleString() + " " + pastSensitivity + " Delta=" + delta + " Bgi=" + bgi + " Deviation=" + deviation + " Absorbed=" + absorbed + " CarbsFromBolus=" + carbsFromBolus + " COB=" + cob;
|
return "AutosensData: " + new Date(time).toLocaleString() + " " + pastSensitivity + " Delta=" + delta + " Bgi=" + bgi + " Deviation=" + deviation + " Absorbed=" + absorbed + " CarbsFromBolus=" + carbsFromBolus + " COB=" + cob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int minOld() {
|
||||||
|
return (int) ((new Date().getTime() - time) / 1000 / 60);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.Config;
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.data.IobTotal;
|
import info.nightscout.androidaps.data.IobTotal;
|
||||||
|
@ -310,6 +311,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
|
|
||||||
previous = autosensData;
|
previous = autosensData;
|
||||||
autosensDataTable.put(bgTime, autosensData);
|
autosensDataTable.put(bgTime, autosensData);
|
||||||
|
if (Config.logAutosensData)
|
||||||
log.debug(autosensData.log(bgTime));
|
log.debug(autosensData.log(bgTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -545,6 +547,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
log.debug("Invalidating cached data to: " + new Date(time).toLocaleString());
|
log.debug("Invalidating cached data to: " + new Date(time).toLocaleString());
|
||||||
for (int index = iobTable.size() - 1; index >= 0; index--) {
|
for (int index = iobTable.size() - 1; index >= 0; index--) {
|
||||||
if (iobTable.keyAt(index) > time) {
|
if (iobTable.keyAt(index) > time) {
|
||||||
|
if (Config.logAutosensData)
|
||||||
log.debug("Removing from iobTable: " + new Date(iobTable.keyAt(index)).toLocaleString());
|
log.debug("Removing from iobTable: " + new Date(iobTable.keyAt(index)).toLocaleString());
|
||||||
iobTable.removeAt(index);
|
iobTable.removeAt(index);
|
||||||
} else {
|
} else {
|
||||||
|
@ -553,6 +556,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
}
|
}
|
||||||
for (int index = autosensDataTable.size() - 1; index >= 0; index--) {
|
for (int index = autosensDataTable.size() - 1; index >= 0; index--) {
|
||||||
if (autosensDataTable.keyAt(index) > time) {
|
if (autosensDataTable.keyAt(index) > time) {
|
||||||
|
if (Config.logAutosensData)
|
||||||
log.debug("Removing from autosensDataTable: " + new Date(autosensDataTable.keyAt(index)).toLocaleString());
|
log.debug("Removing from autosensDataTable: " + new Date(autosensDataTable.keyAt(index)).toLocaleString());
|
||||||
autosensDataTable.removeAt(index);
|
autosensDataTable.removeAt(index);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -12,6 +12,7 @@ import android.support.v7.app.NotificationCompat;
|
||||||
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
|
import org.json.JSONException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -32,8 +33,10 @@ import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Loop.events.EventLoopSetLastRunGui;
|
import info.nightscout.androidaps.plugins.Loop.events.EventLoopSetLastRunGui;
|
||||||
import info.nightscout.androidaps.plugins.Loop.events.EventLoopUpdateGui;
|
import info.nightscout.androidaps.plugins.Loop.events.EventLoopUpdateGui;
|
||||||
import info.nightscout.androidaps.plugins.Loop.events.EventNewOpenLoopNotification;
|
import info.nightscout.androidaps.plugins.Loop.events.EventNewOpenLoopNotification;
|
||||||
|
import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAPlugin;
|
||||||
import info.nightscout.utils.NSUpload;
|
import info.nightscout.utils.NSUpload;
|
||||||
import info.nightscout.utils.SP;
|
import info.nightscout.utils.SP;
|
||||||
|
import info.nightscout.utils.SafeParse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 05.08.2016.
|
* Created by mike on 05.08.2016.
|
||||||
|
|
|
@ -394,12 +394,11 @@ public class NSClientService extends Service {
|
||||||
latestDateInReceivedData = treatment.getMills();
|
latestDateInReceivedData = treatment.getMills();
|
||||||
|
|
||||||
if (treatment.getAction() == null) {
|
if (treatment.getAction() == null) {
|
||||||
if (!isCurrent(treatment)) continue;
|
|
||||||
addedTreatments.put(jsonTreatment);
|
addedTreatments.put(jsonTreatment);
|
||||||
} else if (treatment.getAction().equals("update")) {
|
} else if (treatment.getAction().equals("update")) {
|
||||||
if (!isCurrent(treatment)) continue;
|
|
||||||
updatedTreatments.put(jsonTreatment);
|
updatedTreatments.put(jsonTreatment);
|
||||||
} else if (treatment.getAction().equals("remove")) {
|
} else if (treatment.getAction().equals("remove")) {
|
||||||
|
if (!isCurrent(treatment)) continue;
|
||||||
removedTreatments.put(jsonTreatment);
|
removedTreatments.put(jsonTreatment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ import android.view.LayoutInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
|
@ -55,6 +54,8 @@ import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
|
@ -67,10 +68,12 @@ import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||||
import info.nightscout.androidaps.data.GlucoseStatus;
|
import info.nightscout.androidaps.data.GlucoseStatus;
|
||||||
import info.nightscout.androidaps.data.IobTotal;
|
import info.nightscout.androidaps.data.IobTotal;
|
||||||
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
import info.nightscout.androidaps.db.BgReading;
|
import info.nightscout.androidaps.db.BgReading;
|
||||||
import info.nightscout.androidaps.db.CareportalEvent;
|
import info.nightscout.androidaps.db.CareportalEvent;
|
||||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||||
|
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||||
import info.nightscout.androidaps.db.TempTarget;
|
import info.nightscout.androidaps.db.TempTarget;
|
||||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||||
|
@ -87,6 +90,7 @@ import info.nightscout.androidaps.events.EventTempTargetChange;
|
||||||
import info.nightscout.androidaps.events.EventTreatmentChange;
|
import info.nightscout.androidaps.events.EventTreatmentChange;
|
||||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
|
import info.nightscout.androidaps.plugins.Careportal.CareportalFragment;
|
||||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||||
|
@ -96,7 +100,6 @@ import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugi
|
||||||
import info.nightscout.androidaps.plugins.IobCobCalculator.events.EventAutosensCalculationFinished;
|
import info.nightscout.androidaps.plugins.IobCobCalculator.events.EventAutosensCalculationFinished;
|
||||||
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
|
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Loop.events.EventNewOpenLoopNotification;
|
import info.nightscout.androidaps.plugins.Loop.events.EventNewOpenLoopNotification;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
|
||||||
import info.nightscout.androidaps.plugins.OpenAPSAMA.DetermineBasalResultAMA;
|
import info.nightscout.androidaps.plugins.OpenAPSAMA.DetermineBasalResultAMA;
|
||||||
import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAPlugin;
|
import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAPlugin;
|
||||||
import info.nightscout.androidaps.plugins.Overview.Dialogs.CalibrationDialog;
|
import info.nightscout.androidaps.plugins.Overview.Dialogs.CalibrationDialog;
|
||||||
|
@ -129,16 +132,17 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
return overviewPlugin;
|
return overviewPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextView timeView;
|
||||||
TextView bgView;
|
TextView bgView;
|
||||||
TextView arrowView;
|
TextView arrowView;
|
||||||
TextView timeAgoView;
|
TextView timeAgoView;
|
||||||
TextView deltaView;
|
TextView deltaView;
|
||||||
TextView avgdeltaView;
|
TextView avgdeltaView;
|
||||||
TextView runningTempView;
|
|
||||||
TextView baseBasalView;
|
TextView baseBasalView;
|
||||||
LinearLayout basalLayout;
|
TextView extendedBolusView;
|
||||||
TextView activeProfileView;
|
TextView activeProfileView;
|
||||||
TextView iobView;
|
TextView iobView;
|
||||||
|
TextView cobView;
|
||||||
TextView apsModeView;
|
TextView apsModeView;
|
||||||
TextView tempTargetView;
|
TextView tempTargetView;
|
||||||
TextView pumpStatusView;
|
TextView pumpStatusView;
|
||||||
|
@ -147,6 +151,11 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
GraphView bgGraph;
|
GraphView bgGraph;
|
||||||
GraphView iobGraph;
|
GraphView iobGraph;
|
||||||
|
|
||||||
|
TextView iage;
|
||||||
|
TextView cage;
|
||||||
|
TextView sage;
|
||||||
|
TextView pbage;
|
||||||
|
|
||||||
CheckBox showPredictionView;
|
CheckBox showPredictionView;
|
||||||
CheckBox showBasalsView;
|
CheckBox showBasalsView;
|
||||||
CheckBox showIobView;
|
CheckBox showIobView;
|
||||||
|
@ -179,6 +188,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
private static final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor();
|
private static final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor();
|
||||||
private static ScheduledFuture<?> scheduledUpdate = null;
|
private static ScheduledFuture<?> scheduledUpdate = null;
|
||||||
|
|
||||||
|
final Handler timeHandler = new Handler();
|
||||||
|
|
||||||
public OverviewFragment() {
|
public OverviewFragment() {
|
||||||
super();
|
super();
|
||||||
if (sHandlerThread == null) {
|
if (sHandlerThread == null) {
|
||||||
|
@ -202,12 +213,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
|
|
||||||
View view;
|
View view;
|
||||||
|
|
||||||
if (smallHeight) {
|
if (MainApp.sResources.getBoolean(R.bool.isTablet)) {
|
||||||
|
view = inflater.inflate(R.layout.overview_fragment_tablet, container, false);
|
||||||
|
} else if (smallHeight) {
|
||||||
view = inflater.inflate(R.layout.overview_fragment_smallheight, container, false);
|
view = inflater.inflate(R.layout.overview_fragment_smallheight, container, false);
|
||||||
} else {
|
} else {
|
||||||
view = inflater.inflate(R.layout.overview_fragment, container, false);
|
view = inflater.inflate(R.layout.overview_fragment, container, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timeView = (TextView) view.findViewById(R.id.overview_time);
|
||||||
bgView = (TextView) view.findViewById(R.id.overview_bg);
|
bgView = (TextView) view.findViewById(R.id.overview_bg);
|
||||||
arrowView = (TextView) view.findViewById(R.id.overview_arrow);
|
arrowView = (TextView) view.findViewById(R.id.overview_arrow);
|
||||||
if (smallWidth) {
|
if (smallWidth) {
|
||||||
|
@ -216,9 +230,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
timeAgoView = (TextView) view.findViewById(R.id.overview_timeago);
|
timeAgoView = (TextView) view.findViewById(R.id.overview_timeago);
|
||||||
deltaView = (TextView) view.findViewById(R.id.overview_delta);
|
deltaView = (TextView) view.findViewById(R.id.overview_delta);
|
||||||
avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta);
|
avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta);
|
||||||
runningTempView = (TextView) view.findViewById(R.id.overview_runningtemp);
|
|
||||||
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
|
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
|
||||||
basalLayout = (LinearLayout) view.findViewById(R.id.overview_basallayout);
|
extendedBolusView = (TextView) view.findViewById(R.id.overview_extendedbolus);
|
||||||
activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile);
|
activeProfileView = (TextView) view.findViewById(R.id.overview_activeprofile);
|
||||||
pumpStatusView = (TextView) view.findViewById(R.id.overview_pumpstatus);
|
pumpStatusView = (TextView) view.findViewById(R.id.overview_pumpstatus);
|
||||||
loopStatusLayout = (LinearLayout) view.findViewById(R.id.overview_looplayout);
|
loopStatusLayout = (LinearLayout) view.findViewById(R.id.overview_looplayout);
|
||||||
|
@ -227,9 +240,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
pumpStatusView.setBackgroundColor(MainApp.sResources.getColor(R.color.colorInitializingBorder));
|
pumpStatusView.setBackgroundColor(MainApp.sResources.getColor(R.color.colorInitializingBorder));
|
||||||
|
|
||||||
iobView = (TextView) view.findViewById(R.id.overview_iob);
|
iobView = (TextView) view.findViewById(R.id.overview_iob);
|
||||||
|
cobView = (TextView) view.findViewById(R.id.overview_cob);
|
||||||
apsModeView = (TextView) view.findViewById(R.id.overview_apsmode);
|
apsModeView = (TextView) view.findViewById(R.id.overview_apsmode);
|
||||||
tempTargetView = (TextView) view.findViewById(R.id.overview_temptarget);
|
tempTargetView = (TextView) view.findViewById(R.id.overview_temptarget);
|
||||||
|
|
||||||
|
iage = (TextView) view.findViewById(R.id.careportal_insulinage);
|
||||||
|
cage = (TextView) view.findViewById(R.id.careportal_canulaage);
|
||||||
|
sage = (TextView) view.findViewById(R.id.careportal_sensorage);
|
||||||
|
pbage = (TextView) view.findViewById(R.id.careportal_pbage);
|
||||||
|
|
||||||
bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph);
|
bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph);
|
||||||
iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph);
|
iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph);
|
||||||
|
|
||||||
|
@ -302,6 +321,14 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Timer timeTimer = new Timer();
|
||||||
|
timeTimer.schedule(new TimerTask() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
timeUpdate();
|
||||||
|
}
|
||||||
|
}, 0, 30000);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -823,6 +850,20 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void timeUpdate() {
|
||||||
|
Activity activity = getActivity();
|
||||||
|
if (activity != null)
|
||||||
|
activity.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (timeView != null) { //must not exists
|
||||||
|
timeView.setText(DateUtil.timeString(new Date()));
|
||||||
|
}
|
||||||
|
log.debug("Time updated");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void scheduleUpdateGUI(final String from) {
|
public void scheduleUpdateGUI(final String from) {
|
||||||
class UpdateRunnable implements Runnable {
|
class UpdateRunnable implements Runnable {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -850,6 +891,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
public void updateGUI(String from) {
|
public void updateGUI(String from) {
|
||||||
log.debug("updateGUI entered from: " + from);
|
log.debug("updateGUI entered from: " + from);
|
||||||
updateNotifications();
|
updateNotifications();
|
||||||
|
CareportalFragment.updateAge(getActivity(), sage, iage, cage, pbage);
|
||||||
BgReading actualBG = DatabaseHelper.actualBg();
|
BgReading actualBG = DatabaseHelper.actualBg();
|
||||||
BgReading lastBG = DatabaseHelper.lastBg();
|
BgReading lastBG = DatabaseHelper.lastBg();
|
||||||
|
|
||||||
|
@ -949,22 +991,29 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
TemporaryBasal activeTemp = MainApp.getConfigBuilder().getTempBasalFromHistory(new Date().getTime());
|
TemporaryBasal activeTemp = MainApp.getConfigBuilder().getTempBasalFromHistory(new Date().getTime());
|
||||||
if (MainApp.getConfigBuilder().isTempBasalInProgress()) {
|
if (activeTemp != null) {
|
||||||
cancelTempButton.setVisibility(View.VISIBLE);
|
cancelTempButton.setVisibility(View.VISIBLE);
|
||||||
cancelTempButton.setText(MainApp.instance().getString(R.string.cancel) + "\n" + activeTemp.toStringShort());
|
cancelTempButton.setText(MainApp.instance().getString(R.string.cancel) + "\n" + activeTemp.toStringShort());
|
||||||
runningTempView.setVisibility(View.VISIBLE);
|
|
||||||
runningTempView.setText(activeTemp.toString());
|
|
||||||
} else {
|
} else {
|
||||||
cancelTempButton.setVisibility(View.GONE);
|
cancelTempButton.setVisibility(View.GONE);
|
||||||
runningTempView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pump.getPumpDescription().isTempBasalCapable) {
|
String basalText = "";
|
||||||
basalLayout.setVisibility(View.VISIBLE);
|
if (activeTemp != null) {
|
||||||
baseBasalView.setText(DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h");
|
basalText = activeTemp.toString() + " - ";
|
||||||
} else {
|
|
||||||
basalLayout.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
if (pump.getPumpDescription().isTempBasalCapable) {
|
||||||
|
basalText += DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h";
|
||||||
|
}
|
||||||
|
baseBasalView.setText(basalText);
|
||||||
|
|
||||||
|
ExtendedBolus extendedBolus = MainApp.getConfigBuilder().getExtendedBolusFromHistory(new Date().getTime());
|
||||||
|
String extendedBolusText = "";
|
||||||
|
if (extendedBolus != null) {
|
||||||
|
extendedBolusText = extendedBolus.toString();
|
||||||
|
}
|
||||||
|
if (extendedBolusView != null) // must not exists in all layouts
|
||||||
|
extendedBolusView.setText(extendedBolusText);
|
||||||
|
|
||||||
activeProfileView.setText(MainApp.getConfigBuilder().getProfileName());
|
activeProfileView.setText(MainApp.getConfigBuilder().getProfileName());
|
||||||
activeProfileView.setBackgroundColor(Color.GRAY);
|
activeProfileView.setBackgroundColor(Color.GRAY);
|
||||||
|
@ -1032,6 +1081,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
highLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetHigh, units);
|
highLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetHigh, units);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timeUpdate();
|
||||||
|
|
||||||
// **** BG value ****
|
// **** BG value ****
|
||||||
if (lastBG != null) {
|
if (lastBG != null) {
|
||||||
|
@ -1080,6 +1130,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
+ getString(R.string.basal) + ": " + DecimalFormatter.to2Decimal(basalIob.basaliob) + "U)";
|
+ getString(R.string.basal) + ": " + DecimalFormatter.to2Decimal(basalIob.basaliob) + "U)";
|
||||||
iobView.setText(iobtext);
|
iobView.setText(iobtext);
|
||||||
|
|
||||||
|
// cob
|
||||||
|
if (cobView != null) { // view must not exists
|
||||||
|
String cobText = "";
|
||||||
|
AutosensData autosensData = IobCobCalculatorPlugin.getAutosensData(new Date().getTime());
|
||||||
|
if (autosensData != null)
|
||||||
|
cobText = (int) autosensData.cob + " g " + String.format(MainApp.sResources.getString(R.string.minago), autosensData.minOld());
|
||||||
|
cobView.setText(cobText);
|
||||||
|
}
|
||||||
|
|
||||||
boolean showPrediction = showPredictionView.isChecked() && finalLastRun != null && finalLastRun.constraintsProcessed.getClass().equals(DetermineBasalResultAMA.class);
|
boolean showPrediction = showPredictionView.isChecked() && finalLastRun != null && finalLastRun.constraintsProcessed.getClass().equals(DetermineBasalResultAMA.class);
|
||||||
if (MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class) != null && MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class).isEnabled(PluginBase.APS)) {
|
if (MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class) != null && MainApp.getSpecificPlugin(OpenAPSAMAPlugin.class).isEnabled(PluginBase.APS)) {
|
||||||
showPredictionView.setVisibility(View.VISIBLE);
|
showPredictionView.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/careportal_stats_fragment"
|
layout="@layout/careportal_stats_fragment"
|
||||||
layout_width="match_parent"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -148,6 +147,51 @@
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="end"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="@string/careportal_pbage_label"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingEnd="2dp"
|
||||||
|
android:paddingStart="2dp"
|
||||||
|
android:text=":"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/careportal_pbage"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="start"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dip"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -12,12 +12,11 @@
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true"
|
|
||||||
android:layout_above="@+id/overview_buttons">
|
android:layout_above="@+id/overview_buttons">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
|
@ -30,7 +29,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/overview_looplayout"
|
android:id="@+id/overview_looplayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingTop="2dp">
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
|
@ -72,14 +71,14 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/overview_pumpstatuslayout"
|
android:id="@+id/overview_pumpstatuslayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingTop="2dp">
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/overview_pumpstatus"
|
android:id="@+id/overview_pumpstatus"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:gravity="center_vertical|center_horizontal"
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
@ -126,7 +125,7 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -163,7 +162,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/overview_basallayout"
|
android:id="@+id/overview_basallayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
@ -290,17 +289,15 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/overview_graphs_layout"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.jjoe64.graphview.GraphView
|
<com.jjoe64.graphview.GraphView
|
||||||
android:id="@+id/overview_bggraph"
|
android:id="@+id/overview_bggraph"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="160dip" />
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<com.jjoe64.graphview.GraphView
|
<com.jjoe64.graphview.GraphView
|
||||||
android:id="@+id/overview_iobgraph"
|
android:id="@+id/overview_iobgraph"
|
||||||
|
|
626
app/src/main/res/layout/overview_fragment_tablet.xml
Normal file
626
app/src/main/res/layout/overview_fragment_tablet.xml
Normal file
|
@ -0,0 +1,626 @@
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context="info.nightscout.androidaps.plugins.Overview.OverviewFragment">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_above="@+id/overview_buttons"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.RecyclerView
|
||||||
|
android:id="@+id/overview_notifications"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
</android.support.v7.widget.RecyclerView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/overview_looplayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_apsmode"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:text="Open Loop"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_activeprofile"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="right"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:text="Profile"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_temptarget"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="right"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:text="TempTarget"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/mdtp_white" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/overview_pumpstatuslayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_pumpstatus"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:text="@string/initializing"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_bg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|left"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="00.0"
|
||||||
|
android:textSize="90dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_arrow"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|left"
|
||||||
|
android:layout_marginTop="-15dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="-5dp"
|
||||||
|
android:paddingRight="-5dp"
|
||||||
|
android:text="→"
|
||||||
|
android:textSize="90dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|center_horizontal"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_timeago"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_delta"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_avgdelta"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|left"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="8:00 PM"
|
||||||
|
android:textAlignment="viewEnd"
|
||||||
|
android:textSize="90dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="end"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="@string/basal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingEnd="2dp"
|
||||||
|
android:paddingStart="2dp"
|
||||||
|
android:text=":"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_basebasal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="start"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="0.50U/h @17:35 1/30min - 0.40U/h"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dip"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="end"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="@string/virtualpump_extendedbolus_label"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingEnd="2dp"
|
||||||
|
android:paddingStart="2dp"
|
||||||
|
android:text=":"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_extendedbolus"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="start"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="0.50U/h @17:35 1/30min"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dip"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="end"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="@string/iob"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingEnd="2dp"
|
||||||
|
android:paddingStart="2dp"
|
||||||
|
android:text=":"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_iob"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="start"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="0.50U/h @17:35 1/30min - 0.40U/h"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dip"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="end"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="@string/cob"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingEnd="2dp"
|
||||||
|
android:paddingStart="2dp"
|
||||||
|
android:text=":"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_cob"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="start"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="23 g"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dip"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include
|
||||||
|
layout="@layout/careportal_stats_fragment"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="5dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/overview_showprediction_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="@string/predictionshortlabel"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/prediction"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/overview_showprediction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-5dp"
|
||||||
|
android:layout_marginTop="-9dp"
|
||||||
|
app:buttonTint="@color/prediction" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="@string/basalshortlabel"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/basal"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/overview_showbasals"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-5dp"
|
||||||
|
android:layout_marginTop="-9dp"
|
||||||
|
app:buttonTint="@color/basal" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="@string/iob"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/iob"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/overview_showiob"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-5dp"
|
||||||
|
android:layout_marginTop="-9dp"
|
||||||
|
app:buttonTint="@color/iob" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="@string/cob"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/cob"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/overview_showcob"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-5dp"
|
||||||
|
android:layout_marginTop="-9dp"
|
||||||
|
app:buttonTint="@color/cob" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="@string/dev"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/deviations"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/overview_showdeviations"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-5dp"
|
||||||
|
android:layout_marginTop="-9dp"
|
||||||
|
app:buttonTint="@color/deviations" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/overview_graphs_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.jjoe64.graphview.GraphView
|
||||||
|
android:id="@+id/overview_bggraph"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<com.jjoe64.graphview.GraphView
|
||||||
|
android:id="@+id/overview_iobgraph"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="100dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/overview_buttons"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/overview_accepttemplayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/overview_accepttempbutton"
|
||||||
|
style="?android:attr/buttonStyle"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="3dp"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:text="Accept new temp\n0.25U/h"
|
||||||
|
android:textColor="@color/colorAcceptTempButton" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/overview_treatmentbutton"
|
||||||
|
style="?android:attr/buttonStyle"
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginRight="-4dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:drawableTop="@drawable/icon_bolus"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
|
android:text="@string/overview_bolus_label"
|
||||||
|
android:textColor="@color/colorTreatmentButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/overview_wizardbutton"
|
||||||
|
style="?android:attr/buttonStyle"
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginRight="-4dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:drawableTop="@drawable/icon_calculator"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
|
android:text="@string/overview_calculator_label"
|
||||||
|
android:textColor="@color/colorCalculatorButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/overview_calibrationbutton"
|
||||||
|
style="?android:attr/buttonStyle"
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginRight="-4dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:drawableTop="@drawable/icon_calibration"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
|
android:text="@string/overview_calibration"
|
||||||
|
android:textColor="@color/colorCalibrationButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/overview_quickwizardbutton"
|
||||||
|
style="?android:attr/buttonStyle"
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginRight="-4dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:drawableTop="@drawable/icon_quickwizard"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
|
android:text="Quick wizard"
|
||||||
|
android:textColor="@color/colorQuickWizardButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/overview_canceltempbutton"
|
||||||
|
style="?android:attr/buttonStyle"
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:drawableTop="@drawable/icon_cancelbasal"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
|
android:text="Cancel temp basal"
|
||||||
|
android:textColor="@color/colorCancelTempButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
</FrameLayout>
|
|
@ -124,8 +124,8 @@
|
||||||
<string name="rate">Hodnota</string>
|
<string name="rate">Hodnota</string>
|
||||||
<string name="reason">Zdůvodnění</string>
|
<string name="reason">Zdůvodnění</string>
|
||||||
<string name="safety">Bezpečnost</string>
|
<string name="safety">Bezpečnost</string>
|
||||||
<string name="danar_useextended_title">Použít kombo bolusy pro >200%</string>
|
<string name="danar_useextended_title">Použít prodloužený bolusy pro >200%</string>
|
||||||
<string name="setextendedbolusquestion">Spustit nový kombo bolus:</string>
|
<string name="setextendedbolusquestion">Spustit nový prodloužený bolus:</string>
|
||||||
<string name="setbasalquestion">Spustit nový dočasný bazál:</string>
|
<string name="setbasalquestion">Spustit nový dočasný bazál:</string>
|
||||||
<string name="simpleprofile">Jednoduchý profil</string>
|
<string name="simpleprofile">Jednoduchý profil</string>
|
||||||
<string name="tempbasals_iob_label_string">IOB:</string>
|
<string name="tempbasals_iob_label_string">IOB:</string>
|
||||||
|
@ -157,14 +157,14 @@
|
||||||
<string name="virtualpump">Virtualní pumpa</string>
|
<string name="virtualpump">Virtualní pumpa</string>
|
||||||
<string name="virtualpump_basebasalrate_label">Základní hodnota bazálu</string>
|
<string name="virtualpump_basebasalrate_label">Základní hodnota bazálu</string>
|
||||||
<string name="virtualpump_battery_label">Baterie</string>
|
<string name="virtualpump_battery_label">Baterie</string>
|
||||||
<string name="virtualpump_extendedbolus_label">Kombo bolus</string>
|
<string name="virtualpump_extendedbolus_label">Prodloužený bolus</string>
|
||||||
<string name="virtualpump_reservoir_label">Zásobník</string>
|
<string name="virtualpump_reservoir_label">Zásobník</string>
|
||||||
<string name="virtualpump_resultok">OK</string>
|
<string name="virtualpump_resultok">OK</string>
|
||||||
<string name="virtualpump_sqlerror">Chyba databáze</string>
|
<string name="virtualpump_sqlerror">Chyba databáze</string>
|
||||||
<string name="virtualpump_tempbasal_label">Dočasný bazál</string>
|
<string name="virtualpump_tempbasal_label">Dočasný bazál</string>
|
||||||
<string name="vitualpump_label">VIRTUÁLNÍ PUMPA</string>
|
<string name="vitualpump_label">VIRTUÁLNÍ PUMPA</string>
|
||||||
<string name="xdrip">xDrip</string>
|
<string name="xdrip">xDrip</string>
|
||||||
<string name="overview_extendedbolus_button">Kombo bolus</string>
|
<string name="overview_extendedbolus_button">Prodloužený bolus</string>
|
||||||
<string name="overview_tempbasal_button">Dočasný bazál</string>
|
<string name="overview_tempbasal_button">Dočasný bazál</string>
|
||||||
<string name="nsprofileview_isf_label">Citlivost:</string>
|
<string name="nsprofileview_isf_label">Citlivost:</string>
|
||||||
<string name="nsclientnotinstalled">NSClient není nainstalován. Záznam je ztracen!</string>
|
<string name="nsclientnotinstalled">NSClient není nainstalován. Záznam je ztracen!</string>
|
||||||
|
|
3
app/src/main/res/values-sw600dp/layout.xml
Normal file
3
app/src/main/res/values-sw600dp/layout.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<resources>
|
||||||
|
<bool name="isTablet">true</bool>
|
||||||
|
</resources>
|
3
app/src/main/res/values/layout.xml
Normal file
3
app/src/main/res/values/layout.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<resources>
|
||||||
|
<bool name="isTablet">false</bool>
|
||||||
|
</resources>
|
|
@ -624,4 +624,5 @@
|
||||||
<string name="targetmissing">Target missing in profile. Using default.</string>
|
<string name="targetmissing">Target missing in profile. Using default.</string>
|
||||||
<string name="invalidprofile">Invalid profile !!!</string>
|
<string name="invalidprofile">Invalid profile !!!</string>
|
||||||
<string name="profileswitch">ProfileSwitch</string>
|
<string name="profileswitch">ProfileSwitch</string>
|
||||||
|
<string name="careportal_pbage_label">Pump battery age</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue