Merge remote-tracking branch 'origin/dev' into combo-scripter-v2
* origin/dev: fix not attached to the activity check for no profile check for no profile Fix namespace errors. Add missing ids to other overview layouts. Overview: make checkbox labels toggle state as well. minimum of 30 min for unreachable alert
This commit is contained in:
commit
947203b107
|
@ -82,7 +82,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
Manifest.permission.WRITE_EXTERNAL_STORAGE}, CASE_STORAGE);
|
Manifest.permission.WRITE_EXTERNAL_STORAGE}, CASE_STORAGE);
|
||||||
}
|
}
|
||||||
askForBatteryOptimizationPermission();
|
askForBatteryOptimizationPermission();
|
||||||
checkUpgradeToProfileTarget();
|
doMigrations();
|
||||||
if (Config.logFunctionCalls)
|
if (Config.logFunctionCalls)
|
||||||
log.debug("onCreate");
|
log.debug("onCreate");
|
||||||
|
|
||||||
|
@ -163,6 +163,19 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void doMigrations() {
|
||||||
|
|
||||||
|
checkUpgradeToProfileTarget();
|
||||||
|
|
||||||
|
// guarantee that the unreachable threshold is at least 30 and of type String
|
||||||
|
// Added in 1.57 at 21.01.2018
|
||||||
|
Integer unreachable_threshold = SP.getInt(R.string.key_pump_unreachable_threshold, 30);
|
||||||
|
SP.remove(R.string.key_pump_unreachable_threshold);
|
||||||
|
if(unreachable_threshold < 30) unreachable_threshold = 30;
|
||||||
|
SP.putString(R.string.key_pump_unreachable_threshold, unreachable_threshold.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void checkUpgradeToProfileTarget() { // TODO: can be removed in the future
|
private void checkUpgradeToProfileTarget() { // TODO: can be removed in the future
|
||||||
boolean oldKeyExists = SP.contains("openapsma_min_bg");
|
boolean oldKeyExists = SP.contains("openapsma_min_bg");
|
||||||
if (oldKeyExists) {
|
if (oldKeyExists) {
|
||||||
|
|
|
@ -103,6 +103,11 @@ public class IobCobThread extends Thread {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (profile == null) {
|
||||||
|
log.debug("Aborting calculation thread (no profile): " + from);
|
||||||
|
return; // profile not set yet
|
||||||
|
}
|
||||||
|
|
||||||
if (profile.getIsf(bgTime) == null) {
|
if (profile.getIsf(bgTime) == null) {
|
||||||
log.debug("Aborting calculation thread (no ISF): " + from);
|
log.debug("Aborting calculation thread (no ISF): " + from);
|
||||||
return; // profile not set yet
|
return; // profile not set yet
|
||||||
|
|
|
@ -528,12 +528,12 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
|
||||||
if (calculatedTotalInsulin > 0d || calculatedCarbs > 0d) {
|
if (calculatedTotalInsulin > 0d || calculatedCarbs > 0d) {
|
||||||
String insulinText = calculatedTotalInsulin > 0d ? (DecimalFormatter.to2Decimal(calculatedTotalInsulin) + "U") : "";
|
String insulinText = calculatedTotalInsulin > 0d ? (DecimalFormatter.to2Decimal(calculatedTotalInsulin) + "U") : "";
|
||||||
String carbsText = calculatedCarbs > 0d ? (DecimalFormatter.to0Decimal(calculatedCarbs) + "g") : "";
|
String carbsText = calculatedCarbs > 0d ? (DecimalFormatter.to0Decimal(calculatedCarbs) + "g") : "";
|
||||||
total.setText(getString(R.string.result) + ": " + insulinText + " " + carbsText);
|
total.setText(MainApp.gs(R.string.result) + ": " + insulinText + " " + carbsText);
|
||||||
okButton.setVisibility(View.VISIBLE);
|
okButton.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
// TODO this should also be run when loading the dialog as the OK button is initially visible
|
// TODO this should also be run when loading the dialog as the OK button is initially visible
|
||||||
// but does nothing if neither carbs nor insulin is > 0
|
// but does nothing if neither carbs nor insulin is > 0
|
||||||
total.setText(getString(R.string.missing) + " " + DecimalFormatter.to0Decimal(wizard.carbsEquivalent) + "g");
|
total.setText(MainApp.gs(R.string.missing) + " " + DecimalFormatter.to0Decimal(wizard.carbsEquivalent) + "g");
|
||||||
okButton.setVisibility(View.INVISIBLE);
|
okButton.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,12 +149,18 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
TextView sage;
|
TextView sage;
|
||||||
TextView pbage;
|
TextView pbage;
|
||||||
|
|
||||||
CheckBox showPredictionView;
|
TextView showPredictionLabel;
|
||||||
CheckBox showBasalsView;
|
CheckBox showPredictionCheckbox;
|
||||||
CheckBox showIobView;
|
TextView showBasalsLabel;
|
||||||
CheckBox showCobView;
|
CheckBox showBasalsCheckbox;
|
||||||
CheckBox showDeviationsView;
|
TextView showIobLabel;
|
||||||
CheckBox showRatiosView;
|
CheckBox showIobCheckbox;
|
||||||
|
TextView showCobLabel;
|
||||||
|
CheckBox showCobCheckbox;
|
||||||
|
TextView showDeviationsLabel;
|
||||||
|
CheckBox showDeviationsCheckbox;
|
||||||
|
TextView showRatiosLabel;
|
||||||
|
CheckBox showRatiosCheckbox;
|
||||||
|
|
||||||
RecyclerView notificationsView;
|
RecyclerView notificationsView;
|
||||||
LinearLayoutManager llm;
|
LinearLayoutManager llm;
|
||||||
|
@ -266,24 +272,37 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
|
|
||||||
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
|
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
|
||||||
|
|
||||||
showPredictionView = (CheckBox) view.findViewById(R.id.overview_showprediction);
|
showPredictionCheckbox = (CheckBox) view.findViewById(R.id.overview_showprediction);
|
||||||
showBasalsView = (CheckBox) view.findViewById(R.id.overview_showbasals);
|
showBasalsCheckbox = (CheckBox) view.findViewById(R.id.overview_showbasals);
|
||||||
showIobView = (CheckBox) view.findViewById(R.id.overview_showiob);
|
showIobCheckbox = (CheckBox) view.findViewById(R.id.overview_showiob);
|
||||||
showCobView = (CheckBox) view.findViewById(R.id.overview_showcob);
|
showCobCheckbox = (CheckBox) view.findViewById(R.id.overview_showcob);
|
||||||
showDeviationsView = (CheckBox) view.findViewById(R.id.overview_showdeviations);
|
showDeviationsCheckbox = (CheckBox) view.findViewById(R.id.overview_showdeviations);
|
||||||
showRatiosView = (CheckBox) view.findViewById(R.id.overview_showratios);
|
showRatiosCheckbox = (CheckBox) view.findViewById(R.id.overview_showratios);
|
||||||
showPredictionView.setChecked(SP.getBoolean("showprediction", false));
|
showPredictionCheckbox.setChecked(SP.getBoolean("showprediction", false));
|
||||||
showBasalsView.setChecked(SP.getBoolean("showbasals", true));
|
showBasalsCheckbox.setChecked(SP.getBoolean("showbasals", true));
|
||||||
showIobView.setChecked(SP.getBoolean("showiob", false));
|
showIobCheckbox.setChecked(SP.getBoolean("showiob", false));
|
||||||
showCobView.setChecked(SP.getBoolean("showcob", false));
|
showCobCheckbox.setChecked(SP.getBoolean("showcob", false));
|
||||||
showDeviationsView.setChecked(SP.getBoolean("showdeviations", false));
|
showDeviationsCheckbox.setChecked(SP.getBoolean("showdeviations", false));
|
||||||
showRatiosView.setChecked(SP.getBoolean("showratios", false));
|
showRatiosCheckbox.setChecked(SP.getBoolean("showratios", false));
|
||||||
showPredictionView.setOnCheckedChangeListener(this);
|
showPredictionCheckbox.setOnCheckedChangeListener(this);
|
||||||
showBasalsView.setOnCheckedChangeListener(this);
|
showBasalsCheckbox.setOnCheckedChangeListener(this);
|
||||||
showIobView.setOnCheckedChangeListener(this);
|
showIobCheckbox.setOnCheckedChangeListener(this);
|
||||||
showCobView.setOnCheckedChangeListener(this);
|
showCobCheckbox.setOnCheckedChangeListener(this);
|
||||||
showDeviationsView.setOnCheckedChangeListener(this);
|
showDeviationsCheckbox.setOnCheckedChangeListener(this);
|
||||||
showRatiosView.setOnCheckedChangeListener(this);
|
showRatiosCheckbox.setOnCheckedChangeListener(this);
|
||||||
|
|
||||||
|
showPredictionLabel = (TextView) view.findViewById(R.id.overview_showprediction_label);
|
||||||
|
showPredictionLabel.setOnClickListener(this);
|
||||||
|
showBasalsLabel = (TextView) view.findViewById(R.id.overview_showbasals_label);
|
||||||
|
showBasalsLabel.setOnClickListener(this);
|
||||||
|
showIobLabel = (TextView) view.findViewById(R.id.overview_showiob_label);
|
||||||
|
showIobLabel.setOnClickListener(this);
|
||||||
|
showCobLabel = (TextView) view.findViewById(R.id.overview_showcob_label);
|
||||||
|
showCobLabel.setOnClickListener(this);
|
||||||
|
showDeviationsLabel = (TextView) view.findViewById(R.id.overview_showdeviations_label);
|
||||||
|
showDeviationsLabel.setOnClickListener(this);
|
||||||
|
showRatiosLabel = (TextView) view.findViewById(R.id.overview_showratios_label);
|
||||||
|
showRatiosLabel.setOnClickListener(this);
|
||||||
|
|
||||||
notificationsView = (RecyclerView) view.findViewById(R.id.overview_notifications);
|
notificationsView = (RecyclerView) view.findViewById(R.id.overview_notifications);
|
||||||
notificationsView.setHasFixedSize(true);
|
notificationsView.setHasFixedSize(true);
|
||||||
|
@ -376,24 +395,24 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
case R.id.overview_showiob:
|
case R.id.overview_showiob:
|
||||||
break;
|
break;
|
||||||
case R.id.overview_showcob:
|
case R.id.overview_showcob:
|
||||||
showDeviationsView.setOnCheckedChangeListener(null);
|
showDeviationsCheckbox.setOnCheckedChangeListener(null);
|
||||||
showDeviationsView.setChecked(false);
|
showDeviationsCheckbox.setChecked(false);
|
||||||
showDeviationsView.setOnCheckedChangeListener(this);
|
showDeviationsCheckbox.setOnCheckedChangeListener(this);
|
||||||
break;
|
break;
|
||||||
case R.id.overview_showdeviations:
|
case R.id.overview_showdeviations:
|
||||||
showCobView.setOnCheckedChangeListener(null);
|
showCobCheckbox.setOnCheckedChangeListener(null);
|
||||||
showCobView.setChecked(false);
|
showCobCheckbox.setChecked(false);
|
||||||
showCobView.setOnCheckedChangeListener(this);
|
showCobCheckbox.setOnCheckedChangeListener(this);
|
||||||
break;
|
break;
|
||||||
case R.id.overview_showratios:
|
case R.id.overview_showratios:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SP.putBoolean("showiob", showIobView.isChecked());
|
SP.putBoolean("showiob", showIobCheckbox.isChecked());
|
||||||
SP.putBoolean("showprediction", showPredictionView.isChecked());
|
SP.putBoolean("showprediction", showPredictionCheckbox.isChecked());
|
||||||
SP.putBoolean("showbasals", showBasalsView.isChecked());
|
SP.putBoolean("showbasals", showBasalsCheckbox.isChecked());
|
||||||
SP.putBoolean("showcob", showCobView.isChecked());
|
SP.putBoolean("showcob", showCobCheckbox.isChecked());
|
||||||
SP.putBoolean("showdeviations", showDeviationsView.isChecked());
|
SP.putBoolean("showdeviations", showDeviationsCheckbox.isChecked());
|
||||||
SP.putBoolean("showratios", showRatiosView.isChecked());
|
SP.putBoolean("showratios", showRatiosCheckbox.isChecked());
|
||||||
scheduleUpdateGUI("onGraphCheckboxesCheckedChanged");
|
scheduleUpdateGUI("onGraphCheckboxesCheckedChanged");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -620,6 +639,24 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
if (ConfigBuilderPlugin.getActivePump().isSuspended() || !ConfigBuilderPlugin.getActivePump().isInitialized())
|
if (ConfigBuilderPlugin.getActivePump().isSuspended() || !ConfigBuilderPlugin.getActivePump().isInitialized())
|
||||||
ConfigBuilderPlugin.getCommandQueue().readStatus("RefreshClicked", null);
|
ConfigBuilderPlugin.getCommandQueue().readStatus("RefreshClicked", null);
|
||||||
break;
|
break;
|
||||||
|
case R.id.overview_showprediction_label:
|
||||||
|
showPredictionCheckbox.toggle();
|
||||||
|
break;
|
||||||
|
case R.id.overview_showbasals_label:
|
||||||
|
showBasalsCheckbox.toggle();
|
||||||
|
break;
|
||||||
|
case R.id.overview_showiob_label:
|
||||||
|
showIobCheckbox.toggle();
|
||||||
|
break;
|
||||||
|
case R.id.overview_showcob_label:
|
||||||
|
showCobCheckbox.toggle();
|
||||||
|
break;
|
||||||
|
case R.id.overview_showdeviations_label:
|
||||||
|
showDeviationsCheckbox.toggle();
|
||||||
|
break;
|
||||||
|
case R.id.overview_showratios_label:
|
||||||
|
showRatiosCheckbox.toggle();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1246,13 +1283,13 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
cobView.setText(cobText);
|
cobView.setText(cobText);
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean showPrediction = showPredictionView.isChecked() && finalLastRun != null && finalLastRun.constraintsProcessed.getClass().equals(DetermineBasalResultAMA.class);
|
final boolean showPrediction = showPredictionCheckbox.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);
|
showPredictionCheckbox.setVisibility(View.VISIBLE);
|
||||||
getActivity().findViewById(R.id.overview_showprediction_label).setVisibility(View.VISIBLE);
|
showPredictionLabel.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
showPredictionView.setVisibility(View.GONE);
|
showPredictionCheckbox.setVisibility(View.GONE);
|
||||||
getActivity().findViewById(R.id.overview_showprediction_label).setVisibility(View.GONE);
|
showPredictionLabel.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// pump status from ns
|
// pump status from ns
|
||||||
|
@ -1344,7 +1381,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
graphData.addTreatments(fromTime, endTime);
|
graphData.addTreatments(fromTime, endTime);
|
||||||
|
|
||||||
// add basal data
|
// add basal data
|
||||||
if (pump.getPumpDescription().isTempBasalCapable && showBasalsView.isChecked()) {
|
if (pump.getPumpDescription().isTempBasalCapable && showBasalsCheckbox.isChecked()) {
|
||||||
graphData.addBasals(fromTime, now, lowLine / graphData.maxY / 1.2d);
|
graphData.addBasals(fromTime, now, lowLine / graphData.maxY / 1.2d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1361,23 +1398,23 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
boolean useDevForScale = false;
|
boolean useDevForScale = false;
|
||||||
boolean useRatioForScale = false;
|
boolean useRatioForScale = false;
|
||||||
|
|
||||||
if (showIobView.isChecked()) {
|
if (showIobCheckbox.isChecked()) {
|
||||||
useIobForScale = true;
|
useIobForScale = true;
|
||||||
} else if (showCobView.isChecked()) {
|
} else if (showCobCheckbox.isChecked()) {
|
||||||
useCobForScale = true;
|
useCobForScale = true;
|
||||||
} else if (showDeviationsView.isChecked()) {
|
} else if (showDeviationsCheckbox.isChecked()) {
|
||||||
useDevForScale = true;
|
useDevForScale = true;
|
||||||
} else if (showRatiosView.isChecked()) {
|
} else if (showRatiosCheckbox.isChecked()) {
|
||||||
useRatioForScale = true;
|
useRatioForScale = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showIobView.isChecked())
|
if (showIobCheckbox.isChecked())
|
||||||
secondGraphData.addIob(fromTime, now, useIobForScale, 1d);
|
secondGraphData.addIob(fromTime, now, useIobForScale, 1d);
|
||||||
if (showCobView.isChecked())
|
if (showCobCheckbox.isChecked())
|
||||||
secondGraphData.addCob(fromTime, now, useCobForScale, useCobForScale ? 1d : 0.5d);
|
secondGraphData.addCob(fromTime, now, useCobForScale, useCobForScale ? 1d : 0.5d);
|
||||||
if (showDeviationsView.isChecked())
|
if (showDeviationsCheckbox.isChecked())
|
||||||
secondGraphData.addDeviations(fromTime, now, useDevForScale, 1d);
|
secondGraphData.addDeviations(fromTime, now, useDevForScale, 1d);
|
||||||
if (showRatiosView.isChecked())
|
if (showRatiosCheckbox.isChecked())
|
||||||
secondGraphData.addRatio(fromTime, now, useRatioForScale, 1d);
|
secondGraphData.addRatio(fromTime, now, useRatioForScale, 1d);
|
||||||
|
|
||||||
// **** NOW line ****
|
// **** NOW line ****
|
||||||
|
@ -1391,7 +1428,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (showIobView.isChecked() || showCobView.isChecked() || showDeviationsView.isChecked() || showRatiosView.isChecked()) {
|
if (showIobCheckbox.isChecked() || showCobCheckbox.isChecked() || showDeviationsCheckbox.isChecked() || showRatiosCheckbox.isChecked()) {
|
||||||
iobGraph.setVisibility(View.VISIBLE);
|
iobGraph.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
iobGraph.setVisibility(View.GONE);
|
iobGraph.setVisibility(View.GONE);
|
||||||
|
|
|
@ -637,6 +637,11 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
private String generateBasalString(TreatmentsInterface treatmentsInterface) {
|
private String generateBasalString(TreatmentsInterface treatmentsInterface) {
|
||||||
|
|
||||||
String basalStringResult;
|
String basalStringResult;
|
||||||
|
|
||||||
|
Profile profile = MainApp.getConfigBuilder().getProfile();
|
||||||
|
if (profile == null)
|
||||||
|
return "";
|
||||||
|
|
||||||
TemporaryBasal activeTemp = treatmentsInterface.getTempBasalFromHistory(System.currentTimeMillis());
|
TemporaryBasal activeTemp = treatmentsInterface.getTempBasalFromHistory(System.currentTimeMillis());
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
basalStringResult = activeTemp.toStringShort();
|
basalStringResult = activeTemp.toStringShort();
|
||||||
|
@ -644,7 +649,7 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
if (SP.getBoolean(R.string.key_danar_visualizeextendedaspercentage, false)) {
|
if (SP.getBoolean(R.string.key_danar_visualizeextendedaspercentage, false)) {
|
||||||
basalStringResult = "100%";
|
basalStringResult = "100%";
|
||||||
} else {
|
} else {
|
||||||
basalStringResult = DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + "U/h";
|
basalStringResult = DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return basalStringResult;
|
return basalStringResult;
|
||||||
|
|
|
@ -270,6 +270,7 @@
|
||||||
app:buttonTint="@color/basal" />
|
app:buttonTint="@color/basal" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showbasals_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -286,6 +287,7 @@
|
||||||
app:buttonTint="@color/iob" />
|
app:buttonTint="@color/iob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showiob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -294,7 +296,6 @@
|
||||||
android:textColor="@color/iob"
|
android:textColor="@color/iob"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/overview_showcob"
|
android:id="@+id/overview_showcob"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -303,6 +304,7 @@
|
||||||
app:buttonTint="@color/cob" />
|
app:buttonTint="@color/cob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showcob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -319,6 +321,7 @@
|
||||||
app:buttonTint="@color/deviations" />
|
app:buttonTint="@color/deviations" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showdeviations_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -334,6 +337,7 @@
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showratios_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
@ -479,7 +479,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/prediction" />
|
android:buttonTint="@color/prediction" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/overview_showprediction_label"
|
android:id="@+id/overview_showprediction_label"
|
||||||
|
@ -496,9 +496,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/basal" />
|
android:buttonTint="@color/basal" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showbasals_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -512,9 +513,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/iob" />
|
android:buttonTint="@color/iob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showiob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -529,9 +531,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/cob" />
|
android:buttonTint="@color/cob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showcob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -545,9 +548,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/deviations" />
|
android:buttonTint="@color/deviations" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showdeviations_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -563,6 +567,7 @@
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showratios_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
@ -563,7 +563,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/prediction" />
|
android:buttonTint="@color/prediction" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/overview_showprediction_label"
|
android:id="@+id/overview_showprediction_label"
|
||||||
|
@ -580,9 +580,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/basal" />
|
android:buttonTint="@color/basal" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showbasals_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -596,9 +597,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/iob" />
|
android:buttonTint="@color/iob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showiob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -613,9 +615,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/cob" />
|
android:buttonTint="@color/cob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showcob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -629,9 +632,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/deviations" />
|
android:buttonTint="@color/deviations" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showdeviations_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -647,6 +651,7 @@
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showratios_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/prediction" />
|
android:buttonTint="@color/prediction" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/overview_showprediction_label"
|
android:id="@+id/overview_showprediction_label"
|
||||||
|
@ -262,9 +262,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/basal" />
|
android:buttonTint="@color/basal" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showbasals_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -278,9 +279,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/iob" />
|
android:buttonTint="@color/iob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showiob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -295,9 +297,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/cob" />
|
android:buttonTint="@color/cob" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showcob_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -311,9 +314,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:buttonTint="@color/deviations" />
|
android:buttonTint="@color/deviations" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showdeviations_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
@ -329,6 +333,7 @@
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/overview_showratios_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="others"
|
android:key="others"
|
||||||
android:title="@string/othersettings_title">
|
android:title="@string/othersettings_title">
|
||||||
|
@ -76,12 +77,16 @@
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="@string/key_enable_pump_unreachable_alert"
|
android:key="@string/key_enable_pump_unreachable_alert"
|
||||||
android:title="@string/enable_pump_unreachable_alert" />
|
android:title="@string/enable_pump_unreachable_alert" />
|
||||||
<EditTextPreference
|
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||||
|
validate:testType="numericRange"
|
||||||
|
validate:minNumber="30"
|
||||||
|
validate:maxNumber="300"
|
||||||
android:defaultValue="30"
|
android:defaultValue="30"
|
||||||
android:dependency="@string/key_enable_pump_unreachable_alert"
|
android:dependency="@string/key_enable_pump_unreachable_alert"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:key="@string/key_pump_unreachable_threshold"
|
android:key="@string/key_pump_unreachable_threshold"
|
||||||
android:title="@string/pump_unreachable_threshold"></EditTextPreference>
|
android:title="@string/pump_unreachable_threshold">
|
||||||
|
</com.andreabaccega.widget.ValidatingEditTextPreference>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
|
|
Loading…
Reference in a new issue