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,12 +3,12 @@ package info.nightscout.androidaps.activities
import android.os.Bundle
import info.nightscout.androidaps.dialogs.BolusProgressDialog
class BolusProgressHelperActivity : NoSplashAppCompatActivity() {
class BolusProgressHelperActivity : DialogAppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
BolusProgressDialog()
.setHelperActivity(this)
.setInsulin(intent.getDoubleExtra("insulin", 0.0))
.show(supportFragmentManager, "BolusProgress")
.setHelperActivity(this)
.setInsulin(intent.getDoubleExtra("insulin", 0.0))
.show(supportFragmentManager, "BolusProgress")
}
}

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 javax.inject.Inject
class ErrorHelperActivity : NoSplashAppCompatActivity() {
class ErrorHelperActivity : DialogAppCompatActivity() {
@Inject lateinit var sp : SP
@Override

View file

@ -4,7 +4,7 @@ import android.os.Bundle
import info.nightscout.androidaps.plugins.source.DexcomPlugin
import javax.inject.Inject
class RequestDexcomPermissionActivity : NoSplashAppCompatActivity() {
class RequestDexcomPermissionActivity : DialogAppCompatActivity() {
@Inject lateinit var dexcomPlugin: DexcomPlugin
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.MainApp;
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.ProfileStore;
import info.nightscout.androidaps.events.EventCareportalEventChange;
@ -516,12 +518,8 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
// ------------- DbRequests handling -------------------
public void create(DbRequest dbr) {
try {
public void create(DbRequest dbr) throws SQLException {
getDaoDbRequest().create(dbr);
} catch (SQLException e) {
log.error("Unhandled exception", e);
}
}
public int delete(DbRequest dbr) {
@ -1406,7 +1404,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
where.ge("date", mills).and().isNotNull("json").and().isNotNull("eventType");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents);
careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents;
} catch (SQLException 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");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents);
careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents;
} catch (SQLException e) {
log.error("Unhandled exception", e);
@ -1431,14 +1429,16 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
return new ArrayList<>();
}
public void preprocessOpenAPSOfflineEvents(List<CareportalEvent> list) {
OverlappingIntervals offlineEvents = new OverlappingIntervals();
public List<CareportalEvent> preprocessOpenAPSOfflineEvents(List<CareportalEvent> list) {
NonOverlappingIntervals offlineEvents = new NonOverlappingIntervals();
List<CareportalEvent> other = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
CareportalEvent event = list.get(i);
if (!event.eventType.equals(CareportalEvent.OPENAPSOFFLINE)) continue;
offlineEvents.add(event);
if (event.eventType.equals(CareportalEvent.OPENAPSOFFLINE)) offlineEvents.add(event);
else other.add(event);
}
other.addAll(offlineEvents.getList());
return other;
}
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");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents);
careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents;
} catch (SQLException e) {
log.error("Unhandled exception", e);
@ -1467,7 +1467,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
where.isNotNull("json").and().isNotNull("eventType");
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
preprocessOpenAPSOfflineEvents(careportalEvents);
careportalEvents = preprocessOpenAPSOfflineEvents(careportalEvents);
return careportalEvents;
} catch (SQLException e) {
log.error("Unhandled exception", e);

View file

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

View file

@ -116,40 +116,15 @@ class FillDialog : DialogFragmentWithDate() {
activity?.let { activity ->
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.primefill), HtmlHelper.fromHtml(Joiner.on("<br/>").join(actions)), Runnable {
if (insulinAfterConstraints > 0) {
val detailedBolusInfo = DetailedBolusInfo()
detailedBolusInfo.insulin = insulinAfterConstraints
detailedBolusInfo.context = context
detailedBolusInfo.source = Source.USER
detailedBolusInfo.isValid = false // do not count it in IOB (for pump history)
detailedBolusInfo.notes = notes
commandQueue.bolus(detailedBolusInfo, object : Callback() {
override fun run() {
if (!result.success) {
val i = Intent(ctx, ErrorHelperActivity::class.java)
i.putExtra("soundid", R.raw.boluserror)
i.putExtra("status", result.comment)
i.putExtra("title", resourceHelper.gs(R.string.treatmentdeliveryerror))
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
ctx.startActivity(i)
}
}
})
requestPrimeBolus(insulinAfterConstraints, notes)
}
val careportalEvent = CareportalEvent()
careportalEvent.date = eventTime
careportalEvent.source = Source.USER
if (siteChange) {
careportalEvent.json = generateJson(CareportalEvent.SITECHANGE, eventTime, notes).toString()
careportalEvent.eventType = CareportalEvent.SITECHANGE
NSUpload.uploadEvent(CareportalEvent.SITECHANGE, eventTime, notes)
generateCareportalEvent(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)
generateCareportalEvent(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes)
}
MainApp.getDbHelper().createOrUpdate(careportalEvent)
}, null)
}
} else {
@ -161,6 +136,37 @@ class FillDialog : DialogFragmentWithDate() {
return true
}
private fun requestPrimeBolus(insulin: Double, notes: String) {
val detailedBolusInfo = DetailedBolusInfo()
detailedBolusInfo.insulin = insulin
detailedBolusInfo.context = context
detailedBolusInfo.source = Source.USER
detailedBolusInfo.isValid = false // do not count it in IOB (for pump history)
detailedBolusInfo.notes = notes
commandQueue.bolus(detailedBolusInfo, object : Callback() {
override fun run() {
if (!result.success) {
val i = Intent(ctx, ErrorHelperActivity::class.java)
i.putExtra("soundid", R.raw.boluserror)
i.putExtra("status", result.comment)
i.putExtra("title", resourceHelper.gs(R.string.treatmentdeliveryerror))
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
ctx.startActivity(i)
}
}
})
}
private fun generateCareportalEvent(eventType: String, time: Long, notes: String) {
val careportalEvent = CareportalEvent()
careportalEvent.source = Source.USER
careportalEvent.date = time
careportalEvent.json = generateJson(eventType, time, notes).toString()
careportalEvent.eventType = eventType
MainApp.getDbHelper().createOrUpdate(careportalEvent)
NSUpload.uploadEvent(eventType, time, notes)
}
private fun generateJson(careportalEvent: String, time: Long, notes: String): JSONObject {
val data = JSONObject()
try {
@ -174,4 +180,4 @@ class FillDialog : DialogFragmentWithDate() {
return data
}
}
}

View file

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

View file

@ -50,7 +50,17 @@ public class UploadQueue {
NSClientService.handler.post(() -> {
if (L.isEnabled(L.NSCLIENT))
log.debug("Adding to queue: " + dbr.data);
MainApp.getDbHelper().create(dbr);
try {
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"));
});
}

View file

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

View file

@ -43,7 +43,7 @@ class StatusLightHandler @Inject constructor(
R.string.key_statuslights_bat_warning, 22.0,
batteryView, "BAT", batteryLevel)
} 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())
} else {
handleAge("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT ",
336, 240)
224, 336)
}
}
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 warn = nsSettingsStatus.getExtendedWarnValue(nsSettingPlugin, "warn", defaultWarnThreshold.toDouble())
handleAge(view, text, eventName, warn, urgent, true)

View file

@ -372,7 +372,8 @@ public class GraphData {
actArrayHist.add(new ScaledDataPoint(time, act, actScale));
else
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()];

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
android:id="@+id/danar_history_recyclerview"
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" />
<Button

View file

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -27,54 +27,62 @@
</androidx.recyclerview.widget.RecyclerView>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/overview_looplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="2dp">
app:layout_constraintBottom_toTopOf="@+id/overview_pumpstatuslayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/overview_notifications">
<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:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="Open Loop"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:paddingBottom="3dp"
android:text="@string/openloop"
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
android:id="@+id/overview_activeprofile"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="Profile"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:paddingBottom="3dp"
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
android:id="@+id/overview_temptarget"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="center_vertical|center_horizontal"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="TempTarget"
android:paddingBottom="3dp"
android:text="@string/temptargetshort"
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
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="extended_bolus_short">EB</string>
<string name="phonechecker">\"PhoneChecker\"</string>
<string name="chartmenu">Chart menu</string>
<string name="sensitivity_short">AS</string>
</resources>

View file

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