Merge branch 'dev' into dagger3

This commit is contained in:
Milos Kozak 2020-01-26 21:15:57 +01:00
commit cf2855ab02
21 changed files with 1301 additions and 1864 deletions

View file

@ -3,7 +3,7 @@ package info.nightscout.androidaps.activities
import android.os.Bundle import android.os.Bundle
import info.nightscout.androidaps.dialogs.BolusProgressDialog import info.nightscout.androidaps.dialogs.BolusProgressDialog
class BolusProgressHelperActivity : NoSplashAppCompatActivity() { class BolusProgressHelperActivity : DialogAppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
BolusProgressDialog() BolusProgressDialog()

View file

@ -0,0 +1,11 @@
package info.nightscout.androidaps.activities
import android.content.Context
import androidx.appcompat.app.AppCompatActivity
import info.nightscout.androidaps.utils.LocaleHelper
open class DialogAppCompatActivity : AppCompatActivity() {
public override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(LocaleHelper.wrap(newBase))
}
}

View file

@ -7,7 +7,7 @@ import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.utils.sharedPreferences.SP import info.nightscout.androidaps.utils.sharedPreferences.SP
import javax.inject.Inject import javax.inject.Inject
class ErrorHelperActivity : NoSplashAppCompatActivity() { class ErrorHelperActivity : DialogAppCompatActivity() {
@Inject lateinit var sp : SP @Inject lateinit var sp : SP
@Override @Override

View file

@ -4,7 +4,7 @@ import android.os.Bundle
import info.nightscout.androidaps.plugins.source.DexcomPlugin import info.nightscout.androidaps.plugins.source.DexcomPlugin
import javax.inject.Inject import javax.inject.Inject
class RequestDexcomPermissionActivity : NoSplashAppCompatActivity() { class RequestDexcomPermissionActivity : DialogAppCompatActivity() {
@Inject lateinit var dexcomPlugin: DexcomPlugin @Inject lateinit var dexcomPlugin: DexcomPlugin
private val requestCode = "AndroidAPS <3".map { it.toInt() }.sum() private val requestCode = "AndroidAPS <3".map { it.toInt() }.sum()

View file

@ -33,6 +33,8 @@ import java.util.concurrent.TimeUnit;
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.OverlappingIntervals; import info.nightscout.androidaps.data.OverlappingIntervals;
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.data.NonOverlappingIntervals;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.ProfileStore; import info.nightscout.androidaps.data.ProfileStore;
import info.nightscout.androidaps.events.EventCareportalEventChange; import info.nightscout.androidaps.events.EventCareportalEventChange;
@ -516,12 +518,8 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
// ------------- DbRequests handling ------------------- // ------------- DbRequests handling -------------------
public void create(DbRequest dbr) { public void create(DbRequest dbr) throws SQLException {
try {
getDaoDbRequest().create(dbr); getDaoDbRequest().create(dbr);
} catch (SQLException e) {
log.error("Unhandled exception", e);
}
} }
public int delete(DbRequest dbr) { public int delete(DbRequest dbr) {
@ -1406,7 +1404,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
where.ge("date", mills).and().isNotNull("json").and().isNotNull("eventType"); where.ge("date", mills).and().isNotNull("json").and().isNotNull("eventType");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare(); PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery); careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents); careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents; return careportalEvents;
} catch (SQLException e) { } catch (SQLException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception", e);
@ -1423,7 +1421,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
where.between("date", start, end).and().isNotNull("json").and().isNotNull("eventType"); where.between("date", start, end).and().isNotNull("json").and().isNotNull("eventType");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare(); PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery); careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents); careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents; return careportalEvents;
} catch (SQLException e) { } catch (SQLException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception", e);
@ -1431,14 +1429,16 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
return new ArrayList<>(); return new ArrayList<>();
} }
public void preprocessOpenAPSOfflineEvents(List<CareportalEvent> list) { public List<CareportalEvent> preprocessOpenAPSOfflineEvents(List<CareportalEvent> list) {
OverlappingIntervals offlineEvents = new OverlappingIntervals(); NonOverlappingIntervals offlineEvents = new NonOverlappingIntervals();
List<CareportalEvent> other = new ArrayList<>();
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
CareportalEvent event = list.get(i); CareportalEvent event = list.get(i);
if (!event.eventType.equals(CareportalEvent.OPENAPSOFFLINE)) continue; if (event.eventType.equals(CareportalEvent.OPENAPSOFFLINE)) offlineEvents.add(event);
offlineEvents.add(event); else other.add(event);
} }
other.addAll(offlineEvents.getList());
return other;
} }
public List<CareportalEvent> getCareportalEventsFromTime(long mills, String type, boolean ascending) { public List<CareportalEvent> getCareportalEventsFromTime(long mills, String type, boolean ascending) {
@ -1450,7 +1450,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
where.ge("date", mills).and().eq("eventType", type).and().isNotNull("json"); where.ge("date", mills).and().eq("eventType", type).and().isNotNull("json");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare(); PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery); careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents); careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents; return careportalEvents;
} catch (SQLException e) { } catch (SQLException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception", e);
@ -1467,7 +1467,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
where.isNotNull("json").and().isNotNull("eventType"); where.isNotNull("json").and().isNotNull("eventType");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare(); PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery); careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents); careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents; return careportalEvents;
} catch (SQLException e) { } catch (SQLException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception", e);

View file

@ -61,7 +61,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
dialog?.window?.requestFeature(Window.FEATURE_NO_TITLE) dialog?.window?.requestFeature(Window.FEATURE_NO_TITLE)
dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)
isCancelable = true isCancelable = false
dialog?.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.dialog_bolusprogress, container, false) return inflater.inflate(R.layout.dialog_bolusprogress, container, false)
} }

View file

@ -116,8 +116,29 @@ class FillDialog : DialogFragmentWithDate() {
activity?.let { activity -> activity?.let { activity ->
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.primefill), HtmlHelper.fromHtml(Joiner.on("<br/>").join(actions)), Runnable { OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.primefill), HtmlHelper.fromHtml(Joiner.on("<br/>").join(actions)), Runnable {
if (insulinAfterConstraints > 0) { if (insulinAfterConstraints > 0) {
requestPrimeBolus(insulinAfterConstraints, notes)
}
if (siteChange) {
generateCareportalEvent(CareportalEvent.SITECHANGE, eventTime, notes)
}
if (insulinChange) {
// add a second for case of both checked
generateCareportalEvent(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes)
}
}, null)
}
} else {
activity?.let { activity ->
OKDialog.show(activity, resourceHelper.gs(R.string.primefill), resourceHelper.gs(R.string.no_action_selected))
}
}
dismiss()
return true
}
private fun requestPrimeBolus(insulin: Double, notes: String) {
val detailedBolusInfo = DetailedBolusInfo() val detailedBolusInfo = DetailedBolusInfo()
detailedBolusInfo.insulin = insulinAfterConstraints detailedBolusInfo.insulin = insulin
detailedBolusInfo.context = context detailedBolusInfo.context = context
detailedBolusInfo.source = Source.USER detailedBolusInfo.source = Source.USER
detailedBolusInfo.isValid = false // do not count it in IOB (for pump history) detailedBolusInfo.isValid = false // do not count it in IOB (for pump history)
@ -135,30 +156,15 @@ class FillDialog : DialogFragmentWithDate() {
} }
}) })
} }
private fun generateCareportalEvent(eventType: String, time: Long, notes: String) {
val careportalEvent = CareportalEvent() val careportalEvent = CareportalEvent()
careportalEvent.date = eventTime
careportalEvent.source = Source.USER careportalEvent.source = Source.USER
if (siteChange) { careportalEvent.date = time
careportalEvent.json = generateJson(CareportalEvent.SITECHANGE, eventTime, notes).toString() careportalEvent.json = generateJson(eventType, time, notes).toString()
careportalEvent.eventType = CareportalEvent.SITECHANGE careportalEvent.eventType = eventType
NSUpload.uploadEvent(CareportalEvent.SITECHANGE, eventTime, notes)
}
if (insulinChange) {
// add a second for case of both checked
careportalEvent.json = generateJson(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes).toString()
careportalEvent.eventType = CareportalEvent.INSULINCHANGE
NSUpload.uploadEvent(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes)
}
MainApp.getDbHelper().createOrUpdate(careportalEvent) MainApp.getDbHelper().createOrUpdate(careportalEvent)
}, null) NSUpload.uploadEvent(eventType, time, notes)
}
} else {
activity?.let { activity ->
OKDialog.show(activity, resourceHelper.gs(R.string.primefill), resourceHelper.gs(R.string.no_action_selected))
}
}
dismiss()
return true
} }
private fun generateJson(careportalEvent: String, time: Long, notes: String): JSONObject { private fun generateJson(careportalEvent: String, time: Long, notes: String): JSONObject {

View file

@ -59,7 +59,7 @@ class LoopFragment : DaggerFragment() {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ .subscribe({
clearGUI() clearGUI()
loop_lastrun.text = it.text loop_lastrun?.text = it.text
}, { fabricPrivacy.logException(it) }) }, { fabricPrivacy.logException(it) })
updateGUI() updateGUI()
@ -76,16 +76,16 @@ class LoopFragment : DaggerFragment() {
fun updateGUI() { fun updateGUI() {
if (loop_request == null) return if (loop_request == null) return
loopPlugin.lastRun?.let { loopPlugin.lastRun?.let {
loop_request.text = it.request?.toSpanned() ?: "" loop_request?.text = it.request?.toSpanned() ?: ""
loop_constraintsprocessed.text = it.constraintsProcessed?.toSpanned() ?: "" loop_constraintsprocessed?.text = it.constraintsProcessed?.toSpanned() ?: ""
loop_source.text = it.source ?: "" loop_source?.text = it.source ?: ""
loop_lastrun.text = it.lastAPSRun?.let { lastRun -> DateUtil.dateAndTimeString(lastRun.time) } loop_lastrun?.text = it.lastAPSRun?.let { lastRun -> DateUtil.dateAndTimeString(lastRun.time) }
?: "" ?: ""
loop_lastenact.text = it.lastAPSRun?.let { lastEnact -> DateUtil.dateAndTimeString(lastEnact.time) } loop_lastenact?.text = it.lastAPSRun?.let { lastEnact -> DateUtil.dateAndTimeString(lastEnact.time) }
?: "" ?: ""
loop_tbrsetbypump.text = it.tbrSetByPump?.let { tbrSetByPump -> HtmlHelper.fromHtml(tbrSetByPump.toHtml()) } loop_tbrsetbypump?.text = it.tbrSetByPump?.let { tbrSetByPump -> HtmlHelper.fromHtml(tbrSetByPump.toHtml()) }
?: "" ?: ""
loop_smbsetbypump.text = it.smbSetByPump?.let { smbSetByPump -> HtmlHelper.fromHtml(smbSetByPump.toHtml()) } loop_smbsetbypump?.text = it.smbSetByPump?.let { smbSetByPump -> HtmlHelper.fromHtml(smbSetByPump.toHtml()) }
?: "" ?: ""
val constraints = val constraints =
@ -95,20 +95,19 @@ class LoopFragment : DaggerFragment() {
constraintsProcessed.smbConstraint?.let { smbConstraint -> allConstraints.copyReasons(smbConstraint) } constraintsProcessed.smbConstraint?.let { smbConstraint -> allConstraints.copyReasons(smbConstraint) }
allConstraints.mostLimitedReasons allConstraints.mostLimitedReasons
} ?: "" } ?: ""
loop_constraints.text = constraints loop_constraints?.text = constraints
} }
} }
@Synchronized @Synchronized
private fun clearGUI() { private fun clearGUI() {
if (loop_request == null) return loop_request?.text = ""
loop_request.text = "" loop_constraints?.text = ""
loop_constraints.text = "" loop_constraintsprocessed?.text = ""
loop_constraintsprocessed.text = "" loop_source?.text = ""
loop_source.text = "" loop_lastrun?.text = ""
loop_lastrun.text = "" loop_lastenact?.text = ""
loop_lastenact.text = "" loop_tbrsetbypump?.text = ""
loop_tbrsetbypump.text = "" loop_smbsetbypump?.text = ""
loop_smbsetbypump.text = ""
} }
} }

View file

@ -50,7 +50,17 @@ public class UploadQueue {
NSClientService.handler.post(() -> { NSClientService.handler.post(() -> {
if (L.isEnabled(L.NSCLIENT)) if (L.isEnabled(L.NSCLIENT))
log.debug("Adding to queue: " + dbr.data); log.debug("Adding to queue: " + dbr.data);
try {
MainApp.getDbHelper().create(dbr); MainApp.getDbHelper().create(dbr);
} catch (Exception e) {
log.error("Unhandled exception", e);
dbr.nsClientID += "1";
try {
MainApp.getDbHelper().create(dbr);
} catch (Exception e1) {
log.error("Unhandled exception", e1);
}
}
RxBus.getINSTANCE().send(new EventNSClientResend("newdata")); RxBus.getINSTANCE().send(new EventNSClientResend("newdata"));
}); });
} }

View file

@ -26,6 +26,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.widget.PopupMenu; import androidx.appcompat.widget.PopupMenu;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.res.ResourcesCompat; import androidx.core.content.res.ResourcesCompat;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
@ -121,6 +122,7 @@ import info.nightscout.androidaps.utils.wizard.QuickWizard;
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry; import info.nightscout.androidaps.utils.wizard.QuickWizardEntry;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.schedulers.Schedulers;
import static info.nightscout.androidaps.utils.DateUtil.now; import static info.nightscout.androidaps.utils.DateUtil.now;
@ -158,7 +160,6 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
TextView avgdeltaView; TextView avgdeltaView;
TextView baseBasalView; TextView baseBasalView;
TextView extendedBolusView; TextView extendedBolusView;
LinearLayout extendedBolusLayout;
TextView activeProfileView; TextView activeProfileView;
TextView iobView; TextView iobView;
TextView cobView; TextView cobView;
@ -169,7 +170,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
TextView openapsDeviceStatusView; TextView openapsDeviceStatusView;
TextView uploaderDeviceStatusView; TextView uploaderDeviceStatusView;
TextView iobCalculationProgressView; TextView iobCalculationProgressView;
LinearLayout loopStatusLayout; ConstraintLayout loopStatusLayout;
LinearLayout pumpStatusLayout; LinearLayout pumpStatusLayout;
GraphView bgGraph; GraphView bgGraph;
GraphView iobGraph; GraphView iobGraph;
@ -190,7 +191,6 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
RecyclerView notificationsView; RecyclerView notificationsView;
LinearLayoutManager llm; LinearLayoutManager llm;
LinearLayout acceptTempLayout;
SingleClickButton acceptTempButton; SingleClickButton acceptTempButton;
SingleClickButton treatmentButton; SingleClickButton treatmentButton;
@ -242,8 +242,8 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
} else if (Config.NSCLIENT) { } else if (Config.NSCLIENT) {
view = inflater.inflate(R.layout.overview_fragment_nsclient, container, false); view = inflater.inflate(R.layout.overview_fragment_nsclient, container, false);
shorttextmode = true; shorttextmode = true;
} else if (smallHeight || landscape) { } else if (smallHeight || landscape) { // now testing the same layout for small displays as well
view = inflater.inflate(R.layout.overview_fragment_smallheight, container, false); view = inflater.inflate(R.layout.overview_fragment, container, false);
} else { } else {
view = inflater.inflate(R.layout.overview_fragment, container, false); view = inflater.inflate(R.layout.overview_fragment, container, false);
} }
@ -262,14 +262,13 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
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);
extendedBolusLayout = view.findViewById(R.id.overview_extendedbolus_layout);
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);
pumpDeviceStatusView = (TextView) view.findViewById(R.id.overview_pump); pumpDeviceStatusView = (TextView) view.findViewById(R.id.overview_pump);
openapsDeviceStatusView = (TextView) view.findViewById(R.id.overview_openaps); openapsDeviceStatusView = (TextView) view.findViewById(R.id.overview_openaps);
uploaderDeviceStatusView = (TextView) view.findViewById(R.id.overview_uploader); uploaderDeviceStatusView = (TextView) view.findViewById(R.id.overview_uploader);
iobCalculationProgressView = (TextView) view.findViewById(R.id.overview_iobcalculationprogess); iobCalculationProgressView = (TextView) view.findViewById(R.id.overview_iobcalculationprogess);
loopStatusLayout = (LinearLayout) view.findViewById(R.id.overview_looplayout); loopStatusLayout = view.findViewById(R.id.overview_looplayout);
pumpStatusLayout = (LinearLayout) view.findViewById(R.id.overview_pumpstatuslayout); pumpStatusLayout = (LinearLayout) view.findViewById(R.id.overview_pumpstatuslayout);
pumpStatusView.setBackgroundColor(resourceHelper.gc(R.color.colorInitializingBorder)); pumpStatusView.setBackgroundColor(resourceHelper.gc(R.color.colorInitializingBorder));
@ -317,8 +316,6 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
if (cgmButton != null) if (cgmButton != null)
cgmButton.setOnClickListener(this); cgmButton.setOnClickListener(this);
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
notificationsView = (RecyclerView) view.findViewById(R.id.overview_notifications); notificationsView = (RecyclerView) view.findViewById(R.id.overview_notifications);
notificationsView.setHasFixedSize(false); notificationsView.setHasFixedSize(false);
llm = new LinearLayoutManager(view.getContext()); llm = new LinearLayoutManager(view.getContext());
@ -379,80 +376,80 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
super.onResume(); super.onResume();
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventRefreshOverview.class) .toObservable(EventRefreshOverview.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(eventOpenAPSUpdateGui -> scheduleUpdateGUI(eventOpenAPSUpdateGui.getFrom()), .subscribe(eventOpenAPSUpdateGui -> scheduleUpdateGUI(eventOpenAPSUpdateGui.getFrom()),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventExtendedBolusChange.class) .toObservable(EventExtendedBolusChange.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventExtendedBolusChange"), .subscribe(event -> scheduleUpdateGUI("EventExtendedBolusChange"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventTempBasalChange.class) .toObservable(EventTempBasalChange.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventTempBasalChange"), .subscribe(event -> scheduleUpdateGUI("EventTempBasalChange"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventTreatmentChange.class) .toObservable(EventTreatmentChange.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventTreatmentChange"), .subscribe(event -> scheduleUpdateGUI("EventTreatmentChange"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventTempTargetChange.class) .toObservable(EventTempTargetChange.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventTempTargetChange"), .subscribe(event -> scheduleUpdateGUI("EventTempTargetChange"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventAcceptOpenLoopChange.class) .toObservable(EventAcceptOpenLoopChange.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventAcceptOpenLoopChange"), .subscribe(event -> scheduleUpdateGUI("EventAcceptOpenLoopChange"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventCareportalEventChange.class) .toObservable(EventCareportalEventChange.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventCareportalEventChange"), .subscribe(event -> scheduleUpdateGUI("EventCareportalEventChange"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventInitializationChanged.class) .toObservable(EventInitializationChanged.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventInitializationChanged"), .subscribe(event -> scheduleUpdateGUI("EventInitializationChanged"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventAutosensCalculationFinished.class) .toObservable(EventAutosensCalculationFinished.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventAutosensCalculationFinished"), .subscribe(event -> scheduleUpdateGUI("EventAutosensCalculationFinished"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventProfileNeedsUpdate.class) .toObservable(EventProfileNeedsUpdate.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventProfileNeedsUpdate"), .subscribe(event -> scheduleUpdateGUI("EventProfileNeedsUpdate"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventPreferenceChange.class) .toObservable(EventPreferenceChange.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventPreferenceChange"), .subscribe(event -> scheduleUpdateGUI("EventPreferenceChange"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventNewOpenLoopNotification.class) .toObservable(EventNewOpenLoopNotification.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(Schedulers.io())
.subscribe(event -> scheduleUpdateGUI("EventNewOpenLoopNotification"), .subscribe(event -> scheduleUpdateGUI("EventNewOpenLoopNotification"),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventPumpStatusChanged.class) .toObservable(EventPumpStatusChanged.class)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(event -> updatePumpStatus(event.getStatus(resourceHelper)), .subscribe(event -> updatePumpStatus(event),
exception -> FabricPrivacy.getInstance().logException(exception) exception -> FabricPrivacy.getInstance().logException(exception)
)); ));
disposable.add(rxBus disposable.add(rxBus
@ -961,8 +958,8 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
Activity activity = getActivity(); Activity activity = getActivity();
if (activity != null) if (activity != null)
activity.runOnUiThread(() -> { activity.runOnUiThread(() -> {
if (acceptTempLayout != null) if (acceptTempButton != null)
acceptTempLayout.setVisibility(View.GONE); acceptTempButton.setVisibility(View.GONE);
}); });
} }
@ -974,7 +971,8 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
actionStringHandler.handleInitiate("cancelChangeRequest"); actionStringHandler.handleInitiate("cancelChangeRequest");
} }
private void updatePumpStatus(String status) { private void updatePumpStatus(EventPumpStatusChanged event) {
String status = event.getStatus(resourceHelper);
if (!status.equals("")) { if (!status.equals("")) {
pumpStatusView.setText(status); pumpStatusView.setText(status);
pumpStatusLayout.setVisibility(View.VISIBLE); pumpStatusLayout.setVisibility(View.VISIBLE);
@ -1117,27 +1115,25 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
if (tempTarget != null) { if (tempTarget != null) {
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextWarning)); tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextWarning));
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonWarning)); tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonWarning));
tempTargetView.setVisibility(View.VISIBLE);
tempTargetView.setText(Profile.toTargetRangeString(tempTarget.low, tempTarget.high, Constants.MGDL, units) + " " + DateUtil.untilString(tempTarget.end())); tempTargetView.setText(Profile.toTargetRangeString(tempTarget.low, tempTarget.high, Constants.MGDL, units) + " " + DateUtil.untilString(tempTarget.end()));
} else { } else {
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextDefault)); tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextDefault));
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonDefault)); tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonDefault));
tempTargetView.setText(Profile.toTargetRangeString(profile.getTargetLowMgdl(), profile.getTargetHighMgdl(), Constants.MGDL, units)); tempTargetView.setText(Profile.toTargetRangeString(profile.getTargetLowMgdl(), profile.getTargetHighMgdl(), Constants.MGDL, units));
tempTargetView.setVisibility(View.VISIBLE);
} }
// **** Temp button **** // **** Temp button ****
if (acceptTempLayout != null) { if (acceptTempButton != null) {
boolean showAcceptButton = !closedLoopEnabled.value(); // Open mode needed boolean showAcceptButton = !closedLoopEnabled.value(); // Open mode needed
showAcceptButton = showAcceptButton && loopPlugin.lastRun != null && loopPlugin.lastRun.lastAPSRun != null; // aps result must exist showAcceptButton = showAcceptButton && loopPlugin.lastRun != null && loopPlugin.lastRun.lastAPSRun != null; // aps result must exist
showAcceptButton = showAcceptButton && (loopPlugin.lastRun.lastOpenModeAccept == null || loopPlugin.lastRun.lastOpenModeAccept.getTime() < loopPlugin.lastRun.lastAPSRun.getTime()); // never accepted or before last result showAcceptButton = showAcceptButton && (loopPlugin.lastRun.lastOpenModeAccept == null || loopPlugin.lastRun.lastOpenModeAccept.getTime() < loopPlugin.lastRun.lastAPSRun.getTime()); // never accepted or before last result
showAcceptButton = showAcceptButton && loopPlugin.lastRun.constraintsProcessed.isChangeRequested(); // change is requested showAcceptButton = showAcceptButton && loopPlugin.lastRun.constraintsProcessed.isChangeRequested(); // change is requested
if (showAcceptButton && pump.isInitialized() && !pump.isSuspended() && loopPlugin.isEnabled(PluginType.LOOP)) { if (showAcceptButton && pump.isInitialized() && !pump.isSuspended() && loopPlugin.isEnabled(PluginType.LOOP)) {
acceptTempLayout.setVisibility(View.VISIBLE); acceptTempButton.setVisibility(View.VISIBLE);
acceptTempButton.setText(resourceHelper.gs(R.string.setbasalquestion) + "\n" + loopPlugin.lastRun.constraintsProcessed); acceptTempButton.setText(resourceHelper.gs(R.string.setbasalquestion) + "\n" + loopPlugin.lastRun.constraintsProcessed);
} else { } else {
acceptTempLayout.setVisibility(View.GONE); acceptTempButton.setVisibility(View.GONE);
} }
} }
@ -1202,13 +1198,6 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
if (extendedBolus != null) if (extendedBolus != null)
OKDialog.show(getActivity(), MainApp.gs(R.string.extended_bolus), extendedBolus.toString()); OKDialog.show(getActivity(), MainApp.gs(R.string.extended_bolus), extendedBolus.toString());
}); });
// hide whole line for APS mode
if (extendedBolusLayout != null) {
if (extendedBolusText.equals(""))
extendedBolusLayout.setVisibility(View.GONE);
else
extendedBolusLayout.setVisibility(View.VISIBLE);
}
} }
activeProfileView.setText(profileFunction.getProfileNameWithDuration()); activeProfileView.setText(profileFunction.getProfileNameWithDuration());

View file

@ -43,7 +43,7 @@ class StatusLightHandler @Inject constructor(
R.string.key_statuslights_bat_warning, 22.0, R.string.key_statuslights_bat_warning, 22.0,
batteryView, "BAT", batteryLevel) batteryView, "BAT", batteryLevel)
} else { } else {
applyStatusLight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 504, 240) applyStatusLight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 224, 336)
} }
} }
@ -108,12 +108,12 @@ class StatusLightHandler @Inject constructor(
batteryView, "BAT ", pump.batteryLevel.toDouble()) batteryView, "BAT ", pump.batteryLevel.toDouble())
} else { } else {
handleAge("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT ", handleAge("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT ",
336, 240) 224, 336)
} }
} }
private fun handleAge(nsSettingPlugin: String, eventName: String, view: TextView, text: String, private fun handleAge(nsSettingPlugin: String, eventName: String, view: TextView, text: String,
defaultUrgentThreshold: Int, defaultWarnThreshold: Int) { defaultWarnThreshold: Int, defaultUrgentThreshold: Int) {
val urgent = nsSettingsStatus.getExtendedWarnValue(nsSettingPlugin, "urgent", defaultUrgentThreshold.toDouble()) val urgent = nsSettingsStatus.getExtendedWarnValue(nsSettingPlugin, "urgent", defaultUrgentThreshold.toDouble())
val warn = nsSettingsStatus.getExtendedWarnValue(nsSettingPlugin, "warn", defaultWarnThreshold.toDouble()) val warn = nsSettingsStatus.getExtendedWarnValue(nsSettingPlugin, "warn", defaultWarnThreshold.toDouble())
handleAge(view, text, eventName, warn, urgent, true) handleAge(view, text, eventName, warn, urgent, true)

View file

@ -372,7 +372,8 @@ public class GraphData {
actArrayHist.add(new ScaledDataPoint(time, act, actScale)); actArrayHist.add(new ScaledDataPoint(time, act, actScale));
else else
actArrayPred.add(new ScaledDataPoint(time, act, actScale)); actArrayPred.add(new ScaledDataPoint(time, act, actScale));
if (act > maxIAValue) maxIAValue = act;
maxIAValue = Math.max(maxIAValue, Math.abs(act));
} }
ScaledDataPoint[] actData = new ScaledDataPoint[actArrayHist.size()]; ScaledDataPoint[] actData = new ScaledDataPoint[actArrayHist.size()];

View file

@ -1,106 +0,0 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="2sp"
android:paddingRight="2sp"
tools:context=".plugins.general.careportal.CareportalFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:background="?android:attr/colorControlHighlight"
android:layout_height="26dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:orientation="horizontal">
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:src="@drawable/icon_cp_age_sensor"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"/>
<TextView
android:id="@+id/careportal_sensorage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:src="@drawable/icon_cp_age_insulin"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"/>
<TextView
android:id="@+id/careportal_insulinage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:src="@drawable/icon_cp_age_canula"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"/>
<TextView
android:id="@+id/careportal_canulaage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:src="@drawable/icon_cp_age_battery"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"/>
<TextView
android:id="@+id/careportal_pbage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="1dp"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

View file

@ -77,7 +77,8 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/danar_history_recyclerview" android:id="@+id/danar_history_recyclerview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_above="@id/danar_history_reload"
android:layout_below="@+id/danar_history_status" /> android:layout_below="@+id/danar_history_status" />
<Button <Button

View file

@ -15,6 +15,7 @@
android:padding="5dp"> android:padding="5dp">
<ImageView <ImageView
android:id="@+id/header_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/ic_trending_flat_white_48dp" /> android:src="@drawable/ic_trending_flat_white_48dp" />
@ -28,6 +29,7 @@
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:textAlignment="center" android:textAlignment="center"
android:layout_toEndOf="@id/header_icon"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout> </RelativeLayout>

View file

@ -1,87 +1,102 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".plugins.general.overview.OverviewFragment"> tools:context=".plugins.general.overview.OverviewFragment">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView <ScrollView
android:layout_width="match_parent" android:id="@+id/overview_toppart_scrollbar"
android:layout_height="match_parent" android:layout_width="0dp"
android:layout_above="@+id/overview_buttons" android:layout_height="0dp"
android:fillViewport="true"> app:layout_constraintBottom_toTopOf="@id/overview_accepttempbutton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_notifications" android:id="@+id/overview_notifications"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_looplayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.recyclerview.widget.RecyclerView> </androidx.recyclerview.widget.RecyclerView>
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
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="wrap_content"
android:orientation="horizontal" app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
android:paddingTop="2dp"> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
<TextView <TextView
android:id="@+id/overview_apsmode" android:id="@+id/overview_apsmode"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginRight="5dp" android:layout_marginEnd="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="Open Loop" android:paddingBottom="3dp"
android:text="@string/openloop"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_activeprofile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/overview_activeprofile" android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="Profile" android:paddingBottom="3dp"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:text="@string/profile"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_temptarget"
app:layout_constraintStart_toEndOf="@+id/overview_apsmode"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/overview_temptarget" android:id="@+id/overview_temptarget"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:text="TempTarget"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/temptargetshort"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" /> android:textColor="@color/mdtp_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_activeprofile"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<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="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingTop="2dp"> app:layout_constraintBottom_toTopOf="@+id/bg_tbr_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_looplayout">
<TextView <TextView
android:id="@+id/overview_pumpstatus" android:id="@+id/overview_pumpstatus"
@ -89,261 +104,273 @@
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:paddingBottom="3dp"
android:paddingTop="3dp"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/initializing" android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout> </LinearLayout>
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:baselineAligned="false" android:id="@+id/bg_tbr_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_weight="0"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/overview_statuslights"
<LinearLayout app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content" app:layout_constraintStart_toStartOf="parent"
android:layout_height="wrap_content" app:layout_constraintTop_toBottomOf="@+id/overview_pumpstatuslayout">
android:orientation="horizontal">
<TextView <TextView
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="center_vertical"
android:layout_marginStart="6dp"
android:text="00.0" android:text="00.0"
android:textSize="42sp" android:textSize="42sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
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="center_vertical" android:layout_marginTop="5dp"
android:layout_marginTop="-5dp"
android:layout_marginEnd="4dp"
android:paddingStart="-2dp" android:paddingStart="-2dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:text="→" android:text="→"
android:textSize="28sp" android:textSize="28sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
app:layout_constraintStart_toEndOf="@+id/overview_bg"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
</LinearLayout> <TextView
android:id="@+id/overview_hor_space"
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:text=" "
android:layout_marginTop="2dp" android:textStyle="bold"
android:layout_marginBottom="10dp" app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
android:orientation="vertical"> app:layout_constraintStart_toEndOf="@+id/overview_arrow"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<TextView <TextView
android:id="@+id/overview_timeago" android:id="@+id/overview_timeago"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:text="1 min ago"
android:layout_marginTop="-2dp" android:textSize="14sp"
android:paddingStart="2dp" app:layout_constraintBottom_toTopOf="@+id/overview_delta"
android:textSize="14sp" /> app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_bg" />
<TextView <TextView
android:id="@+id/overview_delta" android:id="@+id/overview_delta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:text="delta 15m: 0.3"
android:layout_marginTop="-2dp" android:textSize="14sp"
android:paddingStart="2dp" app:layout_constraintBottom_toTopOf="@+id/overview_avgdelta"
android:textSize="14sp" /> app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_timeago" />
<TextView <TextView
android:id="@+id/overview_avgdelta" android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:text="delta 40m: 0.3"
android:textSize="14sp"/> android:textSize="14sp"
</LinearLayout> app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
</LinearLayout> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_delta" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<LinearLayout <!-- right side -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_bg_guideline"
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:orientation="vertical"
android:layout_marginStart="5dp" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="6dp" app:layout_constraintEnd_toStartOf="@+id/overview_iob_label"
android:orientation="vertical"> app:layout_constraintGuide_percent="0.40"
app:layout_constraintStart_toEndOf="@+id/overview_hor_space"
<LinearLayout app:layout_constraintTop_toTopOf="parent" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side IOB -->
<TextView <TextView
android:id="@+id/overview_iob_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/iob" android:text="@string/iob"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_cob_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="parent" />
<TextView <TextView
android:id="@+id/overview_iob_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_iob_label"
app:layout_constraintTop_toTopOf="@+id/overview_iob_label" />
<TextView <TextView
android:id="@+id/overview_iob" android:id="@+id/overview_iob"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="14dp" android:layout_marginStart="10dp"
android:text="" android:text="@string/iob"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold"
</LinearLayout> app:layout_constraintBottom_toBottomOf="@+id/overview_iob_label"
app:layout_constraintStart_toEndOf="@+id/overview_iob_colon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side COB -->
<TextView <TextView
android:id="@+id/overview_cob_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/cob" android:text="@string/cob"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView <TextView
android:id="@+id/overview_cob_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_cob_label"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView <TextView
android:id="@+id/overview_cob" android:id="@+id/overview_cob"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="10dp"
android:text="" android:text="@string/cob"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_cob_label"
</LinearLayout> app:layout_constraintStart_toEndOf="@+id/overview_cob_colon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side basal -->
<TextView <TextView
android:id="@+id/overview_basebasal_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/basal_short" android:text="@string/basal_short"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView <TextView
android:id="@+id/overview_basebasal_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_label"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView <TextView
android:id="@+id/overview_basebasal" android:id="@+id/overview_basebasal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min - 0.40U/h" android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold"
</LinearLayout> app:layout_constraintBottom_toBottomOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_colon" />
<LinearLayout
android:id="@+id/overview_extendedbolus_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side extended -->
<TextView <TextView
android:id="@+id/overview_extendedbolus_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/extended_bolus_short" android:text="@string/extended_bolus_short"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_basebasal_label" />
<TextView <TextView
android:id="@+id/overview_extendedbolus_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_label" />
<TextView <TextView
android:id="@+id/overview_extendedbolus" android:id="@+id/overview_extendedbolus"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min - 0.40U/h" android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
</LinearLayout> app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_colon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side AS -->
<TextView <TextView
android:id="@+id/overview_sensitivity_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="1dp" android:text="@string/sensitivity_short"
android:text="AS" android:textSize="16sp"
android:textSize="16sp" /> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_extendedbolus_label" />
<TextView <TextView
android:id="@+id/overview_sensitivity_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_label" />
<TextView <TextView
android:id="@+id/overview_sensitivity" android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginStart="10dp"
android:text="" android:text="100%"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold"
</LinearLayout> app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
</LinearLayout> app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_colon" />
<TextView </androidx.constraintlayout.widget.ConstraintLayout>
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/overview_statuslights" android:id="@+id/overview_statuslights"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="horizontal"> android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/bg_tbr_layout">
<TextView <TextView
android:id="@+id/overview_canulaage" android:id="@+id/overview_canulaage"
@ -392,23 +419,24 @@
</LinearLayout> </LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1">
<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="0dp"
android:layout_height="match_parent" /> android:layout_height="200dp"
app:layout_constraintBottom_toTopOf="@+id/overview_iobgraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_statuslights" />
<ImageButton <ImageButton
android:id="@+id/overview_chartMenuButton" android:id="@+id/overview_chartMenuButton"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_marginTop="5dp"
android:layout_alignParentTop="true" android:layout_marginEnd="5dp"
android:paddingTop="5dp" android:contentDescription="@string/chartmenu"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph"
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" /> app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
<TextView <TextView
@ -416,63 +444,61 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:textSize="15sp" /> android:text=""
android:textSize="15sp"
</RelativeLayout> app:layout_constraintBottom_toBottomOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintStart_toStartOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph" />
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph" android:id="@+id/overview_iobgraph"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="100dp" android:layout_height="100dp"
android:visibility="gone" /> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_bggraph" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </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"
android:visibility="gone">
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_accepttempbutton" android:id="@+id/overview_accepttempbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="3dp" android:paddingStart="5dp"
android:layout_marginTop="3dp" android:paddingEnd="5dp"
android:layout_weight="0.5" android:text="@string/setbasalquestion"
android:text="Accept new temp\n0.25U/h" android:textColor="@color/colorAcceptTempButton"
android:textColor="@color/colorAcceptTempButton" /> app:layout_constraintBottom_toTopOf="@id/overview_buttons_layout"
</LinearLayout> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_toppart_scrollbar" />
<LinearLayout <LinearLayout
android:id="@+id/overview_buttons_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingRight="5dp"> android:paddingStart="0dp"
android:paddingEnd="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_accepttempbutton">
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton" android:id="@+id/overview_treatmentbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs" android:drawableTop="@drawable/icon_insulin_carbs"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_treatment_label" android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton" android:textColor="@color/colorTreatmentButton"
android:textSize="10sp" android:textSize="10sp"
@ -483,56 +509,45 @@
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_bolus" android:drawableTop="@drawable/icon_bolus"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_insulin_label" android:text="@string/overview_insulin_label"
android:textColor="@color/colorInsulinButton" android:textColor="@color/colorInsulinButton"
android:textSize="10sp" android:textSize="10sp" />
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_carbsbutton" android:id="@+id/overview_carbsbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_cp_bolus_carbs" android:drawableTop="@drawable/icon_cp_bolus_carbs"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_carbs_label" android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton" android:textColor="@color/colorCarbsButton"
android:textSize="10sp" android:textSize="10sp" />
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_wizardbutton" android:id="@+id/overview_wizardbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calculator" android:drawableTop="@drawable/icon_calculator"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_calculator_label" android:text="@string/overview_calculator_label"
android:textColor="@color/colorCalculatorButton" android:textColor="@color/colorCalculatorButton"
android:textSize="10sp" android:textSize="10sp" />
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_calibrationbutton" android:id="@+id/overview_calibrationbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calibration" android:drawableTop="@drawable/icon_calibration"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_calibration" android:text="@string/overview_calibration"
android:textColor="@color/colorCalibrationButton" android:textColor="@color/colorCalibrationButton"
android:textSize="10sp" android:textSize="10sp"
@ -543,11 +558,9 @@
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_xdrip" android:drawableTop="@drawable/icon_xdrip"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_cgm" android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton" android:textColor="@color/colorCalibrationButton"
android:textSize="10sp" android:textSize="10sp"
@ -558,18 +571,13 @@
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_quickwizard" android:drawableTop="@drawable/icon_quickwizard"
android:paddingLeft="0dp" android:text="@string/quickwizard"
android:paddingRight="0dp"
android:text="Quick wizard"
android:textColor="@color/colorQuickWizardButton" android:textColor="@color/colorQuickWizardButton"
android:textSize="10sp" android:textSize="10sp" />
android:visibility="gone" />
</LinearLayout> </LinearLayout>
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</FrameLayout>

View file

@ -1,471 +1,524 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".plugins.general.overview.OverviewFragment"> tools:context=".plugins.general.overview.OverviewFragment">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp">
<ScrollView <ScrollView
android:layout_width="match_parent" android:id="@+id/overview_toppart_scrollbar"
android:layout_height="match_parent" android:layout_width="0dp"
android:layout_above="@+id/overview_buttons" android:layout_height="0dp"
android:fillViewport="false"> app:layout_constraintBottom_toTopOf="@id/overview_buttons_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_notifications" android:id="@+id/overview_notifications"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/overview_looplayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.recyclerview.widget.RecyclerView> </androidx.recyclerview.widget.RecyclerView>
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
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="wrap_content"
android:orientation="horizontal" app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
android:paddingTop="2dp"> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
<TextView <TextView
android:id="@+id/overview_apsmode" android:id="@+id/overview_apsmode"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginRight="5dp" android:layout_marginEnd="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="Open Loop" android:paddingBottom="3dp"
android:text="@string/openloop"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_activeprofile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/overview_activeprofile" android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="Profile" android:paddingBottom="3dp"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:text="@string/profile"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_temptarget"
app:layout_constraintStart_toEndOf="@+id/overview_apsmode"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/overview_temptarget" android:id="@+id/overview_temptarget"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="TempTarget" android:paddingBottom="3dp"
android:text="@string/temptargetshort"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" /> android:textColor="@color/mdtp_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_activeprofile"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<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="match_parent" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingTop="2dp"> app:layout_constraintBottom_toTopOf="@+id/bg_tbr_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_looplayout">
<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="match_parent" 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:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="@string/initializing" android:text="@string/initializing"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout> </LinearLayout>
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:baselineAligned="false" android:id="@+id/bg_tbr_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_weight="0"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:orientation="horizontal"
android:orientation="vertical"> app:layout_constraintBottom_toTopOf="@+id/overview_statuslights_nscl"
app:layout_constraintEnd_toEndOf="parent"
<LinearLayout app:layout_constraintStart_toStartOf="parent"
android:layout_width="match_parent" app:layout_constraintTop_toBottomOf="@+id/overview_pumpstatuslayout">
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView <TextView
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="center_vertical"
android:layout_marginStart="6dp"
android:text="00.0" android:text="00.0"
android:textSize="42sp" android:textSize="42sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
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="center_vertical" android:layout_marginTop="5dp"
android:layout_marginTop="-5dp"
android:layout_marginEnd="4dp"
android:paddingStart="-2dp" android:paddingStart="-2dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:text="→" android:text="→"
android:textSize="28sp" android:textSize="28sp"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
app:layout_constraintStart_toEndOf="@+id/overview_bg"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
</LinearLayout> <TextView
android:id="@+id/overview_hor_space"
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:text=" "
android:layout_marginTop="2dp" android:textStyle="bold"
android:layout_marginBottom="10dp" app:layout_constraintEnd_toStartOf="@+id/overview_bg_guideline"
android:orientation="vertical"> app:layout_constraintStart_toEndOf="@+id/overview_arrow"
app:layout_constraintTop_toTopOf="@+id/overview_bg" />
<TextView <TextView
android:id="@+id/overview_timeago" android:id="@+id/overview_timeago"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:text="1 min ago"
android:layout_marginTop="-2dp" android:textSize="14sp"
android:paddingStart="2dp" app:layout_constraintBottom_toTopOf="@+id/overview_delta"
android:layout_weight="0.5" app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
android:textSize="14sp" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_bg" />
<TextView <TextView
android:id="@+id/overview_delta" android:id="@+id/overview_delta"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:text="delta 15m: 0.35"
android:layout_marginTop="-2dp" android:textSize="14sp"
android:paddingStart="2dp" app:layout_constraintBottom_toTopOf="@+id/overview_avgdelta"
android:layout_weight="0.5" app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
android:textSize="14sp" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_timeago" />
<TextView <TextView
android:id="@+id/overview_avgdelta" android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:text="delta 40m: 0.1"
android:layout_weight="0.5" android:textSize="14sp"
android:textSize="12sp"/> app:layout_constraintEnd_toEndOf="@+id/overview_arrow"
</LinearLayout> app:layout_constraintStart_toStartOf="parent"
</LinearLayout> app:layout_constraintTop_toBottomOf="@+id/overview_delta" />
<LinearLayout
<!-- right side -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_bg_guideline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:orientation="vertical"
android:layout_marginTop="6dp" app:layout_constraintBottom_toBottomOf="parent"
android:orientation="vertical"> app:layout_constraintEnd_toStartOf="@+id/overview_iob_label"
app:layout_constraintGuide_percent="0.40"
<LinearLayout app:layout_constraintStart_toEndOf="@+id/overview_hor_space"
android:layout_width="match_parent" app:layout_constraintTop_toTopOf="parent" />
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side IOB -->
<TextView <TextView
android:id="@+id/overview_iob_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/iob" android:text="@string/iob"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_cob_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="parent" />
<TextView <TextView
android:id="@+id/overview_iob_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_iob_label"
app:layout_constraintTop_toTopOf="@+id/overview_iob_label" />
<TextView <TextView
android:id="@+id/overview_iob" android:id="@+id/overview_iob"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="14dp" android:layout_marginStart="10dp"
android:text="" android:text="@string/iob"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"/> android:textStyle="bold"
</LinearLayout> app:layout_constraintBottom_toBottomOf="@+id/overview_iob_label"
app:layout_constraintStart_toEndOf="@+id/overview_iob_colon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side COB -->
<TextView <TextView
android:id="@+id/overview_cob_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/cob" android:text="@string/cob"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView <TextView
android:id="@+id/overview_cob_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_cob_label"
app:layout_constraintTop_toBottomOf="@+id/overview_iob_label" />
<TextView <TextView
android:id="@+id/overview_cob" android:id="@+id/overview_cob"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="10dp"
android:text="" android:text="@string/cob"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"/> android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_cob_label"
</LinearLayout> app:layout_constraintStart_toEndOf="@+id/overview_cob_colon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side basal -->
<TextView <TextView
android:id="@+id/overview_basebasal_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/basal_short" android:text="@string/basal_short"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_extendedbolus_label"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView <TextView
android:id="@+id/overview_basebasal_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" /> android:textSize="16sp"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_label"
app:layout_constraintTop_toBottomOf="@+id/overview_cob_label" />
<TextView <TextView
android:id="@+id/overview_basebasal" android:id="@+id/overview_basebasal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:text="0.50U/h @17:35 1/30min - 0.40U/h" android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"/> android:textStyle="bold"
</LinearLayout> app:layout_constraintBottom_toBottomOf="@+id/overview_basebasal_label"
app:layout_constraintStart_toEndOf="@+id/overview_basebasal_colon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- right side extended -->
<TextView <TextView
android:id="@+id/overview_extendedbolus_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:text="@string/extended_bolus_short"
android:layout_marginEnd="1dp" android:textSize="16sp"
android:text="AS" app:layout_constraintBottom_toTopOf="@+id/overview_sensitivity_label"
android:textSize="16sp" /> app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_basebasal_label" />
<TextView <TextView
android:id="@+id/overview_extendedbolus_colon"
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=":" android:text=":"
android:textSize="16sp" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text=""
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"/> app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
</LinearLayout> app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_label" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="1dp"
android:text="@string/virtualpump_extendedbolus_label_short"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp" />
<TextView <TextView
android:id="@+id/overview_extendedbolus" android:id="@+id/overview_extendedbolus"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginStart="10dp"
android:text="" android:text="0.50U/h @17:35 1/30min"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"/> android:textStyle="bold"
</LinearLayout> app:layout_constraintBottom_toBottomOf="@+id/overview_extendedbolus_label"
</LinearLayout> app:layout_constraintStart_toEndOf="@+id/overview_extendedbolus_colon" />
</LinearLayout> <!-- right side AS -->
<TextView
<LinearLayout android:id="@+id/overview_sensitivity_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<include
layout="@layout/careportal_stats_fragment_short"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:text="@string/sensitivity_short"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_bg_guideline"
app:layout_constraintTop_toBottomOf="@+id/overview_extendedbolus_label" />
<TextView
android:id="@+id/overview_sensitivity_colon"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_label" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="100%"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/overview_sensitivity_label"
app:layout_constraintStart_toEndOf="@+id/overview_sensitivity_colon" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/overview_statuslights_nscl"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?android:attr/colorControlHighlight"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingBottom="4dp"
app:layout_constraintBottom_toTopOf="@+id/overview_pump"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/bg_tbr_layout">
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_canula" />
<TextView
android:id="@+id/careportal_canulaage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_insulin" />
<TextView
android:id="@+id/careportal_insulinage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_sensor" />
<TextView
android:id="@+id/careportal_sensorage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="2dp"
android:textSize="14sp" />
<ImageView
android:layout_width="30dp"
android:layout_height="match_parent"
android:layout_weight="0"
android:gravity="center_vertical"
android:paddingStart="2dp"
android:paddingEnd="1dp"
android:scaleType="centerInside"
android:src="@drawable/icon_cp_age_battery" />
<TextView
android:id="@+id/careportal_pbage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingStart="1dp"
android:paddingEnd="1dp"
android:textSize="14sp" />
</LinearLayout>
<TextView <TextView
android:id="@+id/overview_pump" android:id="@+id/overview_pump"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="4sp" android:paddingStart="4sp"
android:text="" android:paddingEnd="4sp"
android:text="Pump: running"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="14sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_openaps"
</LinearLayout> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
<View app:layout_constraintTop_toBottomOf="@+id/overview_statuslights_nscl" />
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginBottom="2dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:background="@color/listdelimiter" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1">
<TextView <TextView
android:id="@+id/overview_openaps" android:id="@+id/overview_openaps"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="4sp" android:paddingStart="4sp"
android:text="" android:paddingEnd="4sp"
android:text="OAPS: 3 min ago"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="14sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
</LinearLayout> app:layout_constraintEnd_toStartOf="@+id/overview_uploader"
app:layout_constraintStart_toStartOf="parent"
<LinearLayout app:layout_constraintTop_toBottomOf="@+id/overview_pump" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="right"
android:layout_marginEnd="4dp"
android:layout_weight="1">
<TextView <TextView
android:id="@+id/overview_uploader" android:id="@+id/overview_uploader"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:layout_weight="1"
android:gravity="end"
android:paddingStart="4sp"
android:paddingEnd="4sp" android:paddingEnd="4sp"
android:text="" android:text="UPLD: 84%"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="14sp" /> android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/overview_bggraph"
</LinearLayout> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/overview_openaps"
</LinearLayout> app:layout_constraintTop_toBottomOf="@+id/overview_pump" />
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginBottom="2dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:background="@color/listdelimiter" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_weight="1">
<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="0dp"
android:layout_height="match_parent" /> android:layout_height="200dp"
app:layout_constraintBottom_toTopOf="@+id/overview_iobgraph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_openaps" />
<ImageButton <ImageButton
android:id="@+id/overview_chartMenuButton" android:id="@+id/overview_chartMenuButton"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_marginTop="5dp"
android:layout_alignParentTop="true" android:layout_marginEnd="5dp"
android:paddingTop="5dp" android:contentDescription="@string/chartmenu"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph"
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" /> app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
<TextView <TextView
@ -473,73 +526,72 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:textSize="15sp" /> android:text=""
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@+id/overview_bggraph"
app:layout_constraintEnd_toEndOf="@+id/overview_bggraph"
app:layout_constraintStart_toStartOf="@+id/overview_bggraph"
app:layout_constraintTop_toTopOf="@+id/overview_bggraph" />
</RelativeLayout>
<com.jjoe64.graphview.GraphView <com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph" android:id="@+id/overview_iobgraph"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="100dp" /> android:layout_height="100dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_bggraph" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
</ScrollView> </ScrollView>
<LinearLayout <LinearLayout
android:id="@+id/overview_buttons" android:id="@+id/overview_buttons_layout"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingRight="5dp"> android:paddingStart="0dp"
android:paddingEnd="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/overview_toppart_scrollbar">
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_treatmentbutton" android:id="@+id/overview_treatmentbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs" android:drawableTop="@drawable/icon_insulin_carbs"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_treatment_label" android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton" android:textColor="@color/colorTreatmentButton"
android:textSize="10sp" /> android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_insulinbutton" android:id="@+id/overview_insulinbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_bolus" android:drawableTop="@drawable/icon_bolus"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_insulin_label" android:text="@string/overview_insulin_label"
android:textColor="@color/colorInsulinButton" android:textColor="@color/colorInsulinButton"
android:textSize="10sp" android:textSize="10sp" />
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton <info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_carbsbutton" android:id="@+id/overview_carbsbutton"
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_cp_bolus_carbs" android:drawableTop="@drawable/icon_cp_bolus_carbs"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_carbs_label" android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton" android:textColor="@color/colorCarbsButton"
android:textSize="10sp" /> android:textSize="10sp" />
@ -549,13 +601,36 @@
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calculator" android:drawableTop="@drawable/icon_calculator"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_calculator_label" android:text="@string/overview_calculator_label"
android:textColor="@color/colorCalculatorButton" android:textColor="@color/colorCalculatorButton"
android:textSize="10sp" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_calibrationbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_calibration"
android:text="@string/overview_calibration"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_cgmbutton"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_xdrip"
android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp" android:textSize="10sp"
android:visibility="gone" /> android:visibility="gone" />
@ -564,17 +639,13 @@
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="0px" android:layout_width="0px"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginRight="-4dp" android:layout_marginEnd="-4dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_quickwizard" android:drawableTop="@drawable/icon_quickwizard"
android:paddingLeft="0dp" android:text="@string/quickwizard"
android:paddingRight="0dp"
android:text="Quick wizard"
android:textColor="@color/colorQuickWizardButton" android:textColor="@color/colorQuickWizardButton"
android:textSize="10sp" android:textSize="10sp" />
android:visibility="gone" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout>
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -27,54 +27,62 @@
</androidx.recyclerview.widget.RecyclerView> </androidx.recyclerview.widget.RecyclerView>
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
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="wrap_content"
android:orientation="horizontal" app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
android:paddingTop="2dp"> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
<TextView <TextView
android:id="@+id/overview_apsmode" android:id="@+id/overview_apsmode"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginRight="5dp" android:layout_marginEnd="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="Open Loop" android:paddingBottom="3dp"
android:text="@string/openloop"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_activeprofile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/overview_activeprofile" android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="Profile" android:paddingBottom="3dp"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:text="@string/profile"
android:textAppearance="?android:attr/textAppearanceSmall"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/overview_temptarget"
app:layout_constraintStart_toEndOf="@+id/overview_apsmode"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/overview_temptarget" android:id="@+id/overview_temptarget"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp" android:paddingTop="3dp"
android:text="TempTarget" android:paddingBottom="3dp"
android:text="@string/temptargetshort"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/mdtp_white" /> android:textColor="@color/mdtp_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/overview_activeprofile"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout <LinearLayout
android:id="@+id/overview_pumpstatuslayout" android:id="@+id/overview_pumpstatuslayout"

View file

@ -1,565 +0,0 @@
<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=".plugins.general.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="wrap_content"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/overview_notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.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:paddingBottom="3dp"
android:paddingTop="3dp"
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:paddingBottom="3dp"
android:paddingTop="3dp"
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:paddingBottom="3dp"
android:paddingTop="3dp"
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:paddingBottom="3dp"
android:paddingTop="3dp"
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:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/overview_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="2dp"
android:text="00.0"
android:textSize="28sp"
android:textStyle="bold" />
<TextView
android:id="@+id/overview_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="-5dp"
android:layout_marginEnd="4dp"
android:paddingStart="-2dp"
android:paddingEnd="0dp"
android:text="→"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/overview_timeago"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="-2dp"
android:paddingStart="2dp"
android:textSize="14sp" />
<TextView
android:id="@+id/overview_delta"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="-2dp"
android:layout_weight="0.5"
android:paddingStart="2dp"
android:textSize="12sp" />
<TextView
android:id="@+id/overview_avgdelta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="6dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/iob"
android:textSize="14sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="14sp" />
<TextView
android:id="@+id/overview_iob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text=""
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/cob"
android:textSize="16sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="14sp" />
<TextView
android:id="@+id/overview_cob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text=""
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/basal_short"
android:textSize="14sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="14sp" />
<TextView
android:id="@+id/overview_basebasal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:text="0.50U/h @17:35 1/30min - 0.40U/h"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_extendedbolus_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="@string/extended_bolus_short"
android:textSize="14sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="14sp" />
<TextView
android:id="@+id/overview_extendedbolus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:text="0.50U/h @17:35 1/30min - 0.40U/h"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:text="AS"
android:textSize="14sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
android:textSize="14sp" />
<TextView
android:id="@+id/overview_sensitivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text=""
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:id="@+id/overview_statuslights"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/overview_canulaage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_insulinage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_reservoirlevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_sensorage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/overview_batterylevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=""
android:textSize="14sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="200dp">
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_bggraph"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<ImageButton
android:id="@+id/overview_chartMenuButton"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:paddingTop="5dp"
app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" />
<TextView
android:id="@+id/overview_iobcalculationprogess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="15sp" />
</RelativeLayout>
<com.jjoe64.graphview.GraphView
android:id="@+id/overview_iobgraph"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:visibility="gone" />
</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"
android:visibility="gone">
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_accepttempbutton"
style="?android:attr/buttonStyle"
android:layout_width="match_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"
android:paddingRight="5dp">
<info.nightscout.androidaps.utils.SingleClickButton
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_insulin_carbs"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_treatment_label"
android:textColor="@color/colorTreatmentButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_insulinbutton"
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_insulin_label"
android:textColor="@color/colorInsulinButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_carbsbutton"
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_cp_bolus_carbs"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_carbs_label"
android:textColor="@color/colorCarbsButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
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"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
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"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
android:id="@+id/overview_cgmbutton"
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_xdrip"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/overview_cgm"
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.SingleClickButton
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"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</FrameLayout>

View file

@ -1693,5 +1693,7 @@
<string name="closed_loop_disabled_with_eb">Closed loop disabled because of running Extended bolus</string> <string name="closed_loop_disabled_with_eb">Closed loop disabled because of running Extended bolus</string>
<string name="extended_bolus_short">EB</string> <string name="extended_bolus_short">EB</string>
<string name="phonechecker">\"PhoneChecker\"</string> <string name="phonechecker">\"PhoneChecker\"</string>
<string name="chartmenu">Chart menu</string>
<string name="sensitivity_short">AS</string>
</resources> </resources>

View file

@ -465,44 +465,44 @@
</activity> </activity>
<activity <activity
android:name=".interaction.AAPSPreferences" android:name=".interaction.AAPSPreferences"
android:label="SETTINGS"> android:label="@string/menu_settings">
</activity> </activity>
<activity <activity
android:name=".interaction.actions.WizardActivity" android:name=".interaction.actions.WizardActivity"
android:label="Wizard"> android:label="@string/menu_wizard">
</activity> </activity>
<activity <activity
android:name=".interaction.menus.FillMenuActivity" android:name=".interaction.menus.FillMenuActivity"
android:label="Fillmenu"> android:label="@string/menu_prime_fill">
</activity> </activity>
<activity <activity
android:name=".interaction.menus.StatusMenuActivity" android:name=".interaction.menus.StatusMenuActivity"
android:label="Status"> android:label="@string/menu_status">
</activity> </activity>
<activity <activity
android:name=".interaction.actions.BolusActivity" android:name=".interaction.actions.BolusActivity"
android:label="Bolus"> android:label="@string/action_bolus">
</activity> </activity>
<activity <activity
android:name=".interaction.actions.CPPActivity" android:name=".interaction.actions.CPPActivity"
android:label="CPP"> android:label="@string/status_cpp">
</activity> </activity>
<activity <activity
android:name=".interaction.actions.AcceptActivity" android:name=".interaction.actions.AcceptActivity"
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:label="ACCEPT"> android:label="@string/action_confirm">
</activity> </activity>
<activity <activity
android:name=".interaction.actions.FillActivity" android:name=".interaction.actions.FillActivity"
android:label="Fill"> android:label="@string/menu_prime_fill">
</activity> </activity>
<activity <activity
android:name=".interaction.actions.ECarbActivity" android:name=".interaction.actions.ECarbActivity"
android:label="Fill"> android:label="@string/action_carbs">
</activity> </activity>
<activity <activity
android:name=".interaction.actions.TempTargetActivity" android:name=".interaction.actions.TempTargetActivity"
android:label="TempTarget"> android:label="@string/menu_tempt">
</activity> </activity>
</application> </application>
</manifest> </manifest>