nsclient table mode improvements

This commit is contained in:
Milos Kozak 2018-06-23 18:24:04 +02:00
parent 53ba6d46d5
commit 586665e19f
22 changed files with 128 additions and 138 deletions

View file

@ -20,7 +20,6 @@ import android.support.v7.widget.Toolbar;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.text.util.Linkify; import android.text.util.Linkify;
import android.util.Log;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@ -42,11 +41,11 @@ import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.events.EventAppExit; import info.nightscout.androidaps.events.EventAppExit;
import info.nightscout.androidaps.events.EventFeatureRunning; import info.nightscout.androidaps.events.EventFeatureRunning;
import info.nightscout.androidaps.events.EventPreferenceChange;
import info.nightscout.androidaps.events.EventRefreshGui; import info.nightscout.androidaps.events.EventRefreshGui;
import info.nightscout.androidaps.interfaces.PluginBase; import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.Food.FoodPlugin; import info.nightscout.androidaps.plugins.Food.FoodPlugin;
import info.nightscout.androidaps.plugins.Overview.events.EventSetWakeLock;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin; import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.androidaps.setupwizard.SetupWizardActivity; import info.nightscout.androidaps.setupwizard.SetupWizardActivity;
import info.nightscout.androidaps.tabs.TabPageAdapter; import info.nightscout.androidaps.tabs.TabPageAdapter;
@ -88,7 +87,8 @@ public class MainActivity extends AppCompatActivity {
drawerLayout.addDrawerListener(actionBarDrawerToggle); drawerLayout.addDrawerListener(actionBarDrawerToggle);
actionBarDrawerToggle.syncState(); actionBarDrawerToggle.syncState();
onStatusEvent(new EventSetWakeLock(SP.getBoolean("lockscreen", false))); // initialize screen wake lock
onEventPreferenceChange(new EventPreferenceChange(R.string.key_lockscreen));
doMigrations(); doMigrations();
@ -156,9 +156,11 @@ public class MainActivity extends AppCompatActivity {
} }
@Subscribe @Subscribe
public void onStatusEvent(final EventSetWakeLock ev) { public void onEventPreferenceChange(final EventPreferenceChange ev) {
if (ev.isChanged(R.string.key_lockscreen)) {
boolean lock = SP.getBoolean(R.string.key_lockscreen, false);
final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (ev.lock) { if (lock) {
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AAPS"); mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AAPS");
if (!mWakeLock.isHeld()) if (!mWakeLock.isHeld())
mWakeLock.acquire(); mWakeLock.acquire();
@ -167,6 +169,7 @@ public class MainActivity extends AppCompatActivity {
mWakeLock.release(); mWakeLock.release();
} }
} }
}
@Subscribe @Subscribe
public void onStatusEvent(final EventRefreshGui ev) { public void onStatusEvent(final EventRefreshGui ev) {
@ -184,7 +187,7 @@ public class MainActivity extends AppCompatActivity {
} }
} }
boolean lockScreen = BuildConfig.NSCLIENTOLNY && SP.getBoolean("lockscreen", false); boolean lockScreen = BuildConfig.NSCLIENTOLNY && SP.getBoolean(R.string.key_lockscreen, false);
if (lockScreen) if (lockScreen)
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
else else

View file

@ -552,6 +552,11 @@ public class Profile {
else return DecimalFormatter.to1Decimal(valueInMmol); else return DecimalFormatter.to1Decimal(valueInMmol);
} }
public static String toSignedUnitsString(Double valueInMgdl, Double valueInMmol, String units) {
if (units.equals(Constants.MGDL)) return (valueInMgdl > 0 ? "+" : "") + DecimalFormatter.to0Decimal(valueInMgdl);
else return (valueInMmol > 0 ? "+" : "") + DecimalFormatter.to1Decimal(valueInMmol);
}
// targets are stored in mg/dl but profile vary // targets are stored in mg/dl but profile vary
public static String toTargetRangeString(double low, double high, String sourceUnits, String units) { public static String toTargetRangeString(double low, double high, String sourceUnits, String units) {
double lowMgdl = toMgdl(low, sourceUnits); double lowMgdl = toMgdl(low, sourceUnits);

View file

@ -24,14 +24,11 @@ import android.text.style.ForegroundColorSpan;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
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.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
@ -88,6 +85,7 @@ import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialo
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;
import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesPlugin; import info.nightscout.androidaps.plugins.ConstraintsObjectives.ObjectivesPlugin;
import info.nightscout.androidaps.plugins.IobCobCalculator.AutosensResult;
import info.nightscout.androidaps.plugins.IobCobCalculator.CobInfo; import info.nightscout.androidaps.plugins.IobCobCalculator.CobInfo;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin; import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.IobCobCalculator.events.EventAutosensCalculationFinished; import info.nightscout.androidaps.plugins.IobCobCalculator.events.EventAutosensCalculationFinished;
@ -102,7 +100,6 @@ import info.nightscout.androidaps.plugins.Overview.Dialogs.NewInsulinDialog;
import info.nightscout.androidaps.plugins.Overview.Dialogs.NewTreatmentDialog; import info.nightscout.androidaps.plugins.Overview.Dialogs.NewTreatmentDialog;
import info.nightscout.androidaps.plugins.Overview.Dialogs.WizardDialog; import info.nightscout.androidaps.plugins.Overview.Dialogs.WizardDialog;
import info.nightscout.androidaps.plugins.Overview.activities.QuickWizardListActivity; import info.nightscout.androidaps.plugins.Overview.activities.QuickWizardListActivity;
import info.nightscout.androidaps.plugins.Overview.events.EventSetWakeLock;
import info.nightscout.androidaps.plugins.Overview.graphData.GraphData; import info.nightscout.androidaps.plugins.Overview.graphData.GraphData;
import info.nightscout.androidaps.plugins.Overview.notifications.NotificationRecyclerViewAdapter; import info.nightscout.androidaps.plugins.Overview.notifications.NotificationRecyclerViewAdapter;
import info.nightscout.androidaps.plugins.Overview.notifications.NotificationStore; import info.nightscout.androidaps.plugins.Overview.notifications.NotificationStore;
@ -131,8 +128,11 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
TextView timeView; TextView timeView;
TextView bgView; TextView bgView;
TextView arrowView; TextView arrowView;
TextView sensitivityView;
TextView timeAgoView; TextView timeAgoView;
TextView timeAgoShortView;
TextView deltaView; TextView deltaView;
TextView deltaShortView;
TextView avgdeltaView; TextView avgdeltaView;
TextView baseBasalView; TextView baseBasalView;
TextView extendedBolusView; TextView extendedBolusView;
@ -171,8 +171,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
SingleClickButton cgmButton; SingleClickButton cgmButton;
SingleClickButton quickWizardButton; SingleClickButton quickWizardButton;
CheckBox lockScreen;
boolean smallWidth; boolean smallWidth;
boolean smallHeight; boolean smallHeight;
@ -229,8 +227,11 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
if (smallWidth) { if (smallWidth) {
arrowView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 35); arrowView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 35);
} }
sensitivityView = (TextView) view.findViewById(R.id.overview_sensitivity);
timeAgoView = (TextView) view.findViewById(R.id.overview_timeago); timeAgoView = (TextView) view.findViewById(R.id.overview_timeago);
timeAgoShortView = (TextView) view.findViewById(R.id.overview_timeagoshort);
deltaView = (TextView) view.findViewById(R.id.overview_delta); deltaView = (TextView) view.findViewById(R.id.overview_delta);
deltaShortView = (TextView) view.findViewById(R.id.overview_deltashort);
avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta); avgdeltaView = (TextView) view.findViewById(R.id.overview_avgdelta);
baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal); baseBasalView = (TextView) view.findViewById(R.id.overview_basebasal);
extendedBolusView = (TextView) view.findViewById(R.id.overview_extendedbolus); extendedBolusView = (TextView) view.findViewById(R.id.overview_extendedbolus);
@ -327,18 +328,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
setupChartMenu(view); setupChartMenu(view);
lockScreen = (CheckBox) view.findViewById(R.id.overview_lockscreen);
if (lockScreen != null) {
lockScreen.setChecked(SP.getBoolean("lockscreen", false));
lockScreen.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
SP.putBoolean("lockscreen", isChecked);
MainApp.bus().post(new EventSetWakeLock(isChecked));
}
});
}
return view; return view;
} catch (Exception e) { } catch (Exception e) {
FabricPrivacy.logException(e); FabricPrivacy.logException(e);
@ -1088,12 +1077,18 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
arrowView.setTextColor(color); arrowView.setTextColor(color);
GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData(); GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData();
if (glucoseStatus != null) { if (glucoseStatus != null) {
if (deltaView != null)
deltaView.setText("Δ " + Profile.toUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) + " " + units); deltaView.setText("Δ " + Profile.toUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) + " " + units);
if (deltaShortView != null)
deltaShortView.setText(Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units));
if (avgdeltaView != null) if (avgdeltaView != null)
avgdeltaView.setText("øΔ15m: " + Profile.toUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units) + avgdeltaView.setText("øΔ15m: " + Profile.toUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units) +
" øΔ40m: " + Profile.toUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units)); " øΔ40m: " + Profile.toUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units));
} else { } else {
if (deltaView != null)
deltaView.setText("Δ " + MainApp.gs(R.string.notavailable)); deltaView.setText("Δ " + MainApp.gs(R.string.notavailable));
if (deltaShortView != null)
deltaShortView.setText("---");
if (avgdeltaView != null) if (avgdeltaView != null)
avgdeltaView.setText(""); avgdeltaView.setText("");
} }
@ -1249,7 +1244,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
extendedBolusView.setText(extendedBolusText); extendedBolusView.setText(extendedBolusText);
} }
if (extendedBolusText.equals("")) if (extendedBolusText.equals(""))
extendedBolusView.setVisibility(View.GONE); extendedBolusView.setVisibility(View.INVISIBLE);
else else
extendedBolusView.setVisibility(View.VISIBLE); extendedBolusView.setVisibility(View.VISIBLE);
} }
@ -1316,7 +1311,10 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
flag &= ~Paint.STRIKE_THRU_TEXT_FLAG; flag &= ~Paint.STRIKE_THRU_TEXT_FLAG;
bgView.setPaintFlags(flag); bgView.setPaintFlags(flag);
if (timeAgoView != null)
timeAgoView.setText(DateUtil.minAgo(lastBG.date)); timeAgoView.setText(DateUtil.minAgo(lastBG.date));
if (timeAgoShortView != null)
timeAgoShortView.setText("(" + DateUtil.minAgoShort(lastBG.date) + ")");
// iob // iob
TreatmentsPlugin.getPlugin().updateTotalIOBTreatments(); TreatmentsPlugin.getPlugin().updateTotalIOBTreatments();
@ -1376,6 +1374,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
uploaderDeviceStatusView.setOnClickListener(v -> OKDialog.show(getActivity(), MainApp.gs(R.string.uploader), NSDeviceStatus.getInstance().getExtendedUploaderStatus(), null)); uploaderDeviceStatusView.setOnClickListener(v -> OKDialog.show(getActivity(), MainApp.gs(R.string.uploader), NSDeviceStatus.getInstance().getExtendedUploaderStatus(), null));
} }
// Sensitivity
if (sensitivityView != null) {
AutosensResult lastAutosensResult = IobCobCalculatorPlugin.getPlugin().detectSensitivityWithLock(IobCobCalculatorPlugin.getPlugin().oldestDataAvailable(), System.currentTimeMillis());
if (lastAutosensResult != null)
sensitivityView.setText(String.format("%.0f%%", lastAutosensResult.ratio * 100));
else
sensitivityView.setText("");
}
// ****** GRAPH ******* // ****** GRAPH *******
new Thread(() -> { new Thread(() -> {

View file

@ -1,15 +0,0 @@
package info.nightscout.androidaps.plugins.Overview.events;
import info.nightscout.androidaps.events.Event;
/**
* Created by mike on 02.07.2017.
*/
public class EventSetWakeLock extends Event {
public boolean lock = false;
public EventSetWakeLock(boolean val) {
lock = val;
}
}

View file

@ -49,7 +49,8 @@ import info.nightscout.utils.Round;
public class GraphData { public class GraphData {
private GraphView graph; private GraphView graph;
public double maxY = 0; public double maxY = Double.MIN_VALUE;
public double minY = Double.MAX_VALUE;
private List<BgReading> bgReadingsArray; private List<BgReading> bgReadingsArray;
private String units; private String units;
private List<Series> series = new ArrayList<>(); private List<Series> series = new ArrayList<>();
@ -63,7 +64,7 @@ public class GraphData {
} }
public void addBgReadings(long fromTime, long toTime, double lowLine, double highLine, List<BgReading> predictions) { public void addBgReadings(long fromTime, long toTime, double lowLine, double highLine, List<BgReading> predictions) {
double maxBgValue = 0d; double maxBgValue = Double.MIN_VALUE;
bgReadingsArray = MainApp.getDbHelper().getBgreadingsDataFromTime(fromTime, true); bgReadingsArray = MainApp.getDbHelper().getBgreadingsDataFromTime(fromTime, true);
List<DataPointWithLabelInterface> bgListArray = new ArrayList<>(); List<DataPointWithLabelInterface> bgListArray = new ArrayList<>();
@ -93,10 +94,8 @@ public class GraphData {
maxY = maxBgValue; maxY = maxBgValue;
minY = 0;
// set manual y bounds to have nice steps // set manual y bounds to have nice steps
graph.getViewport().setMaxY(maxY);
graph.getViewport().setMinY(0);
graph.getViewport().setYAxisBoundsManual(true);
graph.getGridLabelRenderer().setNumVerticalLabels(numOfVertLines); graph.getGridLabelRenderer().setNumVerticalLabels(numOfVertLines);
addSeries(new PointsWithLabelGraphSeries<>(bg)); addSeries(new PointsWithLabelGraphSeries<>(bg));
@ -335,7 +334,7 @@ public class GraphData {
public void addIob(long fromTime, long toTime, boolean useForScale, double scale) { public void addIob(long fromTime, long toTime, boolean useForScale, double scale) {
FixedLineGraphSeries<ScaledDataPoint> iobSeries; FixedLineGraphSeries<ScaledDataPoint> iobSeries;
List<ScaledDataPoint> iobArray = new ArrayList<>(); List<ScaledDataPoint> iobArray = new ArrayList<>();
Double maxIobValueFound = 0d; Double maxIobValueFound = Double.MIN_VALUE;
double lastIob = 0; double lastIob = 0;
Scale iobScale = new Scale(); Scale iobScale = new Scale();
@ -361,8 +360,10 @@ public class GraphData {
iobSeries.setColor(MainApp.gc(R.color.iob)); iobSeries.setColor(MainApp.gc(R.color.iob));
iobSeries.setThickness(3); iobSeries.setThickness(3);
if (useForScale) if (useForScale) {
maxY = maxIobValueFound; maxY = maxIobValueFound;
minY = -maxIobValueFound;
}
iobScale.setMultiplier(maxY * scale / maxIobValueFound); iobScale.setMultiplier(maxY * scale / maxIobValueFound);
@ -406,8 +407,10 @@ public class GraphData {
cobSeries.setColor(MainApp.gc(R.color.cob)); cobSeries.setColor(MainApp.gc(R.color.cob));
cobSeries.setThickness(3); cobSeries.setThickness(3);
if (useForScale) if (useForScale) {
maxY = maxCobValueFound; maxY = maxCobValueFound;
minY = 0;
}
cobScale.setMultiplier(maxY * scale / maxCobValueFound); cobScale.setMultiplier(maxY * scale / maxCobValueFound);
@ -466,8 +469,10 @@ public class GraphData {
} }
}); });
if (useForScale) if (useForScale) {
maxY = maxDevValueFound; maxY = maxDevValueFound;
minY = -maxY;
}
devScale.setMultiplier(maxY * scale / maxDevValueFound); devScale.setMultiplier(maxY * scale / maxDevValueFound);
@ -478,14 +483,16 @@ public class GraphData {
public void addRatio(long fromTime, long toTime, boolean useForScale, double scale) { public void addRatio(long fromTime, long toTime, boolean useForScale, double scale) {
LineGraphSeries<ScaledDataPoint> ratioSeries; LineGraphSeries<ScaledDataPoint> ratioSeries;
List<ScaledDataPoint> ratioArray = new ArrayList<>(); List<ScaledDataPoint> ratioArray = new ArrayList<>();
Double maxRatioValueFound = 0d; Double maxRatioValueFound = Double.MIN_VALUE;
Scale ratioScale = new Scale(-1d); Double minRatioValueFound = Double.MAX_VALUE;
Scale ratioScale = new Scale();
for (long time = fromTime; time <= toTime; time += 5 * 60 * 1000L) { for (long time = fromTime; time <= toTime; time += 5 * 60 * 1000L) {
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getAutosensData(time); AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getAutosensData(time);
if (autosensData != null) { if (autosensData != null) {
ratioArray.add(new ScaledDataPoint(time, autosensData.autosensRatio, ratioScale)); ratioArray.add(new ScaledDataPoint(time, autosensData.autosensRatio - 1, ratioScale));
maxRatioValueFound = Math.max(maxRatioValueFound, Math.abs(autosensData.autosensRatio)); maxRatioValueFound = Math.max(maxRatioValueFound, autosensData.autosensRatio - 1);
minRatioValueFound = Math.min(minRatioValueFound, autosensData.autosensRatio - 1);
} }
} }
@ -496,8 +503,10 @@ public class GraphData {
ratioSeries.setColor(MainApp.gc(R.color.ratio)); ratioSeries.setColor(MainApp.gc(R.color.ratio));
ratioSeries.setThickness(3); ratioSeries.setThickness(3);
if (useForScale) if (useForScale) {
maxY = maxRatioValueFound; maxY = maxRatioValueFound;
minY = minRatioValueFound;
}
ratioScale.setMultiplier(maxY * scale / maxRatioValueFound); ratioScale.setMultiplier(maxY * scale / maxRatioValueFound);
@ -538,8 +547,10 @@ public class GraphData {
dsMinSeries.setColor(MainApp.gc(R.color.devslopeneg)); dsMinSeries.setColor(MainApp.gc(R.color.devslopeneg));
dsMinSeries.setThickness(3); dsMinSeries.setThickness(3);
if (useForScale) if (useForScale) {
maxY = Math.max(maxFromMaxValueFound, maxFromMinValueFound); maxY = Math.max(maxFromMaxValueFound, maxFromMinValueFound);
minY = -maxY;
}
dsMaxScale.setMultiplier(maxY * scale / maxFromMaxValueFound); dsMaxScale.setMultiplier(maxY * scale / maxFromMaxValueFound);
dsMinScale.setMultiplier(maxY * scale / maxFromMinValueFound); dsMinScale.setMultiplier(maxY * scale / maxFromMinValueFound);
@ -593,6 +604,10 @@ public class GraphData {
} }
} }
graph.getViewport().setMaxY(maxY);
graph.getViewport().setMinY(minY);
graph.getViewport().setYAxisBoundsManual(true);
// draw it // draw it
graph.onDataChanged(false, false); graph.onDataChanged(false, false);
} }

View file

@ -135,6 +135,11 @@ public class DateUtil {
return MainApp.gs(R.string.minago, mins); return MainApp.gs(R.string.minago, mins);
} }
public static String minAgoShort(long time) {
Integer mins = (int) ((time - now()) / 1000 / 60);
return (mins > 0 ? "+" : "") + mins.toString();
}
public static String hourAgo(long time) { public static String hourAgo(long time) {
double hours = (now() - time) / 1000d / 60 / 60; double hours = (now() - time) / 1000d / 60 / 60;
return MainApp.gs(R.string.hoursago, hours); return MainApp.gs(R.string.hoursago, hours);

View file

@ -164,12 +164,6 @@
android:textSize="30sp" android:textSize="30sp"
android:textStyle="bold" /> android:textStyle="bold" />
<CheckBox
android:id="@+id/overview_lockscreen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lock_screen_short"
android:textAlignment="center" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -68,9 +68,9 @@
android:layout_gravity="right" android:layout_gravity="right"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:text="TempTarget"
android:paddingBottom="3dp" android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="TempTarget"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" /> android:textColor="@color/mdtp_white" />
@ -89,9 +89,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp" android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:gravity="center_vertical|center_horizontal"
android:text="@string/initializing" android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout> </LinearLayout>
@ -106,8 +106,7 @@
android:id="@+id/overview_bg" android:id="@+id/overview_bg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top|left" android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="00.0" android:text="00.0"
android:textSize="90dp" android:textSize="90dp"
android:textStyle="bold" /> android:textStyle="bold" />
@ -116,69 +115,51 @@
android:id="@+id/overview_arrow" android:id="@+id/overview_arrow"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top|left" android:layout_gravity="center_vertical"
android:layout_marginTop="-15dp" android:layout_marginTop="-15dp"
android:gravity="center_vertical"
android:paddingLeft="-5dp" android:paddingLeft="-5dp"
android:paddingRight="-5dp" android:paddingRight="-5dp"
android:text="→" android:text="→"
android:textSize="90dp" android:textSize="50sp"
android:textStyle="bold" /> android:textStyle="bold" />
<LinearLayout <TextView
android:id="@+id/overview_deltashort"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top|center_horizontal" android:layout_gravity="center_vertical"
android:layout_marginTop="10dp" android:text="-0.5"
android:layout_weight="0.5" android:textSize="50sp"
android:gravity="top|center_horizontal" android:textStyle="bold" />
android:orientation="vertical">
<TextView <TextView
android:id="@+id/overview_timeago" android:id="@+id/overview_sensitivity"
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" />
<CheckBox
android:id="@+id/overview_lockscreen"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="0.5" android:layout_weight="0.5"
android:text="@string/lock_screen" android:gravity="center_vertical|center_horizontal"
android:textAlignment="center" /> android:text="100%"
android:textSize="50sp"
</LinearLayout> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/overview_time" android:id="@+id/overview_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top|left" android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="8:00 PM" android:text="8:00 PM"
android:textSize="90dp" android:textSize="80dp"
android:textStyle="bold" />
<TextView
android:id="@+id/overview_timeagoshort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="(-5)"
android:textSize="50sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
@ -616,8 +597,8 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="5dp" android:orientation="horizontal"
android:orientation="horizontal"> android:paddingRight="5dp">
<info.nightscout.utils.SingleClickButton <info.nightscout.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton" android:id="@+id/overview_treatmentbutton"

View file

@ -561,7 +561,6 @@
<string name="basal_short">БАЗА</string> <string name="basal_short">БАЗА</string>
<string name="virtualpump_extendedbolus_label_short">УД.</string> <string name="virtualpump_extendedbolus_label_short">УД.</string>
<string name="lock_screen">Заключен екран</string> <string name="lock_screen">Заключен екран</string>
<string name="lock_screen_short">Закл</string>
<string name="sensitivity_warning">Когато включите Autosense feature трябва да въвеждате ВСИЧКИ въглехидрати. В противен случай те ще се изчисляват грешно като повишена чувствителност!!</string> <string name="sensitivity_warning">Когато включите Autosense feature трябва да въвеждате ВСИЧКИ въглехидрати. В противен случай те ще се изчисляват грешно като повишена чувствителност!!</string>
<string name="sensitivityweightedaverage">чрез Среднопретеглената стойност</string> <string name="sensitivityweightedaverage">чрез Среднопретеглената стойност</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>

View file

@ -526,7 +526,6 @@
<string name="invalidprofile">Chybný profil !!!</string> <string name="invalidprofile">Chybný profil !!!</string>
<string name="iob">IOB</string> <string name="iob">IOB</string>
<string name="lock_screen">Zámek obrazovky</string> <string name="lock_screen">Zámek obrazovky</string>
<string name="lock_screen_short">Zámek</string>
<string name="mdtp_cancel">Zrušit</string> <string name="mdtp_cancel">Zrušit</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>
<string name="ns_alarmoptions">Nastavení alarmů</string> <string name="ns_alarmoptions">Nastavení alarmů</string>

View file

@ -493,7 +493,6 @@
<string name="danar_totaluploaded">Insgesamt %1$d Einträge erfolgreich hochgeladen</string> <string name="danar_totaluploaded">Insgesamt %1$d Einträge erfolgreich hochgeladen</string>
<string name="danarprofile_dia_summary">Dauer der Insulinwirkung</string> <string name="danarprofile_dia_summary">Dauer der Insulinwirkung</string>
<string name="insulin_shortname">INS</string> <string name="insulin_shortname">INS</string>
<string name="lock_screen_short">Sperr</string>
<string name="needwhitelisting">%1$s benötigt Batterie-Optimierungs-Whitelisting, um korrekt arbeiten zu können</string> <string name="needwhitelisting">%1$s benötigt Batterie-Optimierungs-Whitelisting, um korrekt arbeiten zu können</string>
<string name="nsalarm_staledata">Veraltete Daten</string> <string name="nsalarm_staledata">Veraltete Daten</string>
<string name="nsalarm_staledatavalue_label">Veraltete Daten seit [Min.]</string> <string name="nsalarm_staledatavalue_label">Veraltete Daten seit [Min.]</string>

View file

@ -559,7 +559,6 @@
<string name="basal_short">BAS</string> <string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string> <string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Κλείδωμα οθόνης</string> <string name="lock_screen">Κλείδωμα οθόνης</string>
<string name="lock_screen_short">Κλείδωμα</string>
<string name="sensitivity_warning">Ενεργοποιώντας το autosense θυμιθείτε να εισάγετε όλους τους υδατ. Διαφορετικά, οι αποκλίσεις των υδατανθράκων θα εντοπιστούν λανθασμένα ως αλλαγή ευαισθησίας</string> <string name="sensitivity_warning">Ενεργοποιώντας το autosense θυμιθείτε να εισάγετε όλους τους υδατ. Διαφορετικά, οι αποκλίσεις των υδατανθράκων θα εντοπιστούν λανθασμένα ως αλλαγή ευαισθησίας</string>
<string name="sensitivityweightedaverage">Σταθμισμένος μέσος όρος ευαισθησίας</string> <string name="sensitivityweightedaverage">Σταθμισμένος μέσος όρος ευαισθησίας</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>

View file

@ -578,7 +578,6 @@
<string name="basal_short">BAS</string> <string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string> <string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Bloqueo de pantalla</string> <string name="lock_screen">Bloqueo de pantalla</string>
<string name="lock_screen_short">Bloqueo</string>
<string name="sensitivity_warning">Al activar autosens recuerda editar todos carbohidratos comidos. Si no, sensibilidad será calculada incorrectamente !!!</string> <string name="sensitivity_warning">Al activar autosens recuerda editar todos carbohidratos comidos. Si no, sensibilidad será calculada incorrectamente !!!</string>
<string name="sensitivityweightedaverage">Sensitivity WeightedAverage</string> <string name="sensitivityweightedaverage">Sensitivity WeightedAverage</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>

View file

@ -557,7 +557,6 @@
<string name="basal_short">BAS</string> <string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string> <string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Écran verrouillé</string> <string name="lock_screen">Écran verrouillé</string>
<string name="lock_screen_short">verrouiller</string>
<string name="sensitivity_warning">En activant la fonction Autosens, noubliez pas de rentrer tout les glucides consommés. Sinon les déviations de glucides seront incorrectement identifiées alors que la sensibilité change !!</string> <string name="sensitivity_warning">En activant la fonction Autosens, noubliez pas de rentrer tout les glucides consommés. Sinon les déviations de glucides seront incorrectement identifiées alors que la sensibilité change !!</string>
<string name="sensitivityweightedaverage">Sensibilité avec moyenne pondérée</string> <string name="sensitivityweightedaverage">Sensibilité avec moyenne pondérée</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>

View file

@ -571,7 +571,6 @@
<string name="basal_short">BAS</string> <string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string> <string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">화면 잠금</string> <string name="lock_screen">화면 잠금</string>
<string name="lock_screen_short">잠금</string>
<string name="sensitivity_warning">Autosense 기능을 켜면 모든 섭취된 탄수화물양을 입력하십시오. 그렇지 않으면 탄수화물 편차(deviations)가 민감도 변화로 잘못 인식될것입니다!!</string> <string name="sensitivity_warning">Autosense 기능을 켜면 모든 섭취된 탄수화물양을 입력하십시오. 그렇지 않으면 탄수화물 편차(deviations)가 민감도 변화로 잘못 인식될것입니다!!</string>
<string name="sensitivityweightedaverage">민감도 가중평균</string> <string name="sensitivityweightedaverage">민감도 가중평균</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>

View file

@ -203,7 +203,6 @@
<string name="localprofile">Lokaal profiel</string> <string name="localprofile">Lokaal profiel</string>
<string name="localprofile_shortname">LP</string> <string name="localprofile_shortname">LP</string>
<string name="lock_screen">Vergrendel scherm</string> <string name="lock_screen">Vergrendel scherm</string>
<string name="lock_screen_short">Vergrendel</string>
<string name="loop">Loop</string> <string name="loop">Loop</string>
<string name="loop_aps_label">APS</string> <string name="loop_aps_label">APS</string>
<string name="loop_constraintsprocessed_label">Berekening met toepassing van limieten</string> <string name="loop_constraintsprocessed_label">Berekening met toepassing van limieten</string>

View file

@ -595,7 +595,6 @@
<string name="basal_short">BAS</string> <string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string> <string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Zablokuj obraz</string> <string name="lock_screen">Zablokuj obraz</string>
<string name="lock_screen_short">Zablokuj</string>
<string name="sensitivity_warning">Przy włączonej funkcji Autosens pamiętaj, żeby wprowadzać wszystkie węglowodany. W innym wypadku odchylenia węglowodanów będą błędnie identyfikowane jako zmiany wrażliwości !!</string> <string name="sensitivity_warning">Przy włączonej funkcji Autosens pamiętaj, żeby wprowadzać wszystkie węglowodany. W innym wypadku odchylenia węglowodanów będą błędnie identyfikowane jako zmiany wrażliwości !!</string>
<string name="sensitivityweightedaverage">Wrażliwość ŚredniaWażona</string> <string name="sensitivityweightedaverage">Wrażliwość ŚredniaWażona</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>

View file

@ -590,7 +590,6 @@
<string name="basal_short">BAZ</string> <string name="basal_short">BAZ</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string> <string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Ecran blocare</string> <string name="lock_screen">Ecran blocare</string>
<string name="lock_screen_short">Blocat</string>
<string name="sensitivity_warning">Trebuie introduși toți carbo la pornirea Autosens. În caz contrar, acțiunea carbo va fi percepută ca schimbare a sensibilității!</string> <string name="sensitivity_warning">Trebuie introduși toți carbo la pornirea Autosens. În caz contrar, acțiunea carbo va fi percepută ca schimbare a sensibilității!</string>
<string name="sensitivityweightedaverage">Mediană sensibilitate</string> <string name="sensitivityweightedaverage">Mediană sensibilitate</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>

View file

@ -555,7 +555,6 @@
<string name="invalid">НЕВЕРНО</string> <string name="invalid">НЕВЕРНО</string>
<string name="invalidprofile">Неверный профиль !!!</string> <string name="invalidprofile">Неверный профиль !!!</string>
<string name="lock_screen">блокировка экрана</string> <string name="lock_screen">блокировка экрана</string>
<string name="lock_screen_short">блок</string>
<string name="mdtp_cancel">отмена</string> <string name="mdtp_cancel">отмена</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>
<string name="nl_lang">Голландский</string> <string name="nl_lang">Голландский</string>

View file

@ -539,7 +539,6 @@
<string name="end_user_license_agreement_text">MUST NOT BE USED TO MAKE MEDICAL DECISIONS. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</string> <string name="end_user_license_agreement_text">MUST NOT BE USED TO MAKE MEDICAL DECISIONS. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</string>
<string name="isfmissing">ISF saknas i profilen. Använder standardvärde.</string> <string name="isfmissing">ISF saknas i profilen. Använder standardvärde.</string>
<string name="lock_screen">Lås skärm</string> <string name="lock_screen">Lås skärm</string>
<string name="lock_screen_short">Lås</string>
<string name="mmol">mmol/l</string> <string name="mmol">mmol/l</string>
<string name="minago" formatted="false">%d&#160;m</string> <string name="minago" formatted="false">%d&#160;m</string>
<string name="mgdl">mg/dl</string> <string name="mgdl">mg/dl</string>

View file

@ -686,7 +686,7 @@
<string name="basal_short">BAS</string> <string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string> <string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Lock screen</string> <string name="lock_screen">Lock screen</string>
<string name="lock_screen_short">Lock</string> <string name="lock_screen_summary">Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet.</string>
<string name="sensitivity_warning">By turning on Autosense feature remember to enter all eated carbs. Otherwise carbs deviations will be identified wrong as sensitivity change !!</string> <string name="sensitivity_warning">By turning on Autosense feature remember to enter all eated carbs. Otherwise carbs deviations will be identified wrong as sensitivity change !!</string>
<string name="sensitivityweightedaverage">Sensitivity WeightedAverage</string> <string name="sensitivityweightedaverage">Sensitivity WeightedAverage</string>
<string name="mdtp_ok">OK</string> <string name="mdtp_ok">OK</string>
@ -1171,6 +1171,7 @@
<string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Lower sensitivity for temptargets < 100]]></string> <string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Lower sensitivity for temptargets < 100]]></string>
<string name="combo_invalid_setup">Invalid pump setup, check the docs and verify that the Quick Info menu is named "QUICK INFO" using the 360 configuration software.</string> <string name="combo_invalid_setup">Invalid pump setup, check the docs and verify that the Quick Info menu is named "QUICK INFO" using the 360 configuration software.</string>
<string name="custom">Custom</string> <string name="custom">Custom</string>
<string name="key_lockscreen" translatable="false">lockscreen</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%d day</item> <item quantity="one">%d day</item>

View file

@ -4,6 +4,12 @@
<PreferenceCategory android:title="@string/overview"> <PreferenceCategory android:title="@string/overview">
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_lockscreen"
android:title="@string/lock_screen"
android:summary="@string/lock_screen_summary"/>
<PreferenceScreen android:title="@string/overview_buttons_selection"> <PreferenceScreen android:title="@string/overview_buttons_selection">
<SwitchPreference <SwitchPreference