Merge branch 'dev' into history
This commit is contained in:
commit
e005d6bd69
|
@ -2,8 +2,6 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="info.nightscout.androidaps">
|
package="info.nightscout.androidaps">
|
||||||
|
|
||||||
<permission android:name="com.eveningoutpost.dexdrip.permissions.RECEIVE_EXTERNAL_STATUSLINE"/>
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|
|
@ -148,7 +148,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
RecyclerView notificationsView;
|
RecyclerView notificationsView;
|
||||||
LinearLayoutManager llm;
|
LinearLayoutManager llm;
|
||||||
|
|
||||||
LinearLayout cancelTempLayout;
|
|
||||||
LinearLayout acceptTempLayout;
|
LinearLayout acceptTempLayout;
|
||||||
Button cancelTempButton;
|
Button cancelTempButton;
|
||||||
Button treatmentButton;
|
Button treatmentButton;
|
||||||
|
@ -231,7 +230,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
calibrationButton = (Button) view.findViewById(R.id.overview_calibrationbutton);
|
calibrationButton = (Button) view.findViewById(R.id.overview_calibrationbutton);
|
||||||
calibrationButton.setOnClickListener(this);
|
calibrationButton.setOnClickListener(this);
|
||||||
|
|
||||||
cancelTempLayout = (LinearLayout) view.findViewById(R.id.overview_canceltemplayout);
|
|
||||||
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
|
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
|
||||||
|
|
||||||
showPredictionView = (CheckBox) view.findViewById(R.id.overview_showprediction);
|
showPredictionView = (CheckBox) view.findViewById(R.id.overview_showprediction);
|
||||||
|
@ -885,12 +883,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
|
|
||||||
TempBasal activeTemp = pump.getTempBasal();
|
TempBasal activeTemp = pump.getTempBasal();
|
||||||
if (pump.isTempBasalInProgress()) {
|
if (pump.isTempBasalInProgress()) {
|
||||||
cancelTempLayout.setVisibility(View.VISIBLE);
|
cancelTempButton.setVisibility(View.VISIBLE);
|
||||||
cancelTempButton.setText(MainApp.instance().getString(R.string.cancel) + ": " + activeTemp.toString());
|
cancelTempButton.setText(MainApp.instance().getString(R.string.cancel) + "\n" + activeTemp.toStringShort());
|
||||||
runningTempView.setVisibility(View.VISIBLE);
|
runningTempView.setVisibility(View.VISIBLE);
|
||||||
runningTempView.setText(activeTemp.toString());
|
runningTempView.setText(activeTemp.toString());
|
||||||
} else {
|
} else {
|
||||||
cancelTempLayout.setVisibility(View.GONE);
|
cancelTempButton.setVisibility(View.GONE);
|
||||||
runningTempView.setVisibility(View.GONE);
|
runningTempView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -939,7 +937,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
QuickWizard.QuickWizardEntry quickWizardEntry = getPlugin().quickWizard.getActive();
|
QuickWizard.QuickWizardEntry quickWizardEntry = getPlugin().quickWizard.getActive();
|
||||||
if (quickWizardEntry != null && lastBG != null && pump.isInitialized() && !pump.isSuspended()) {
|
if (quickWizardEntry != null && lastBG != null && pump.isInitialized() && !pump.isSuspended()) {
|
||||||
quickWizardButton.setVisibility(View.VISIBLE);
|
quickWizardButton.setVisibility(View.VISIBLE);
|
||||||
String text = MainApp.sResources.getString(R.string.bolus) + ": " + quickWizardEntry.buttonText() + " " + DecimalFormatter.to0Decimal(quickWizardEntry.carbs()) + "g";
|
String text = quickWizardEntry.buttonText() + "\n" + DecimalFormatter.to0Decimal(quickWizardEntry.carbs()) + "g";
|
||||||
BolusWizard wizard = new BolusWizard();
|
BolusWizard wizard = new BolusWizard();
|
||||||
wizard.doCalc(profile.getDefaultProfile(), quickWizardEntry.carbs(), 0d, lastBG.valueToUnits(profile.getUnits()), 0d, true, true, false, false);
|
wizard.doCalc(profile.getDefaultProfile(), quickWizardEntry.carbs(), 0d, lastBG.valueToUnits(profile.getUnits()), 0d, true, true, false, false);
|
||||||
text += " " + DecimalFormatter.to2Decimal(wizard.calculatedTotalInsulin) + "U";
|
text += " " + DecimalFormatter.to2Decimal(wizard.calculatedTotalInsulin) + "U";
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class StatuslinePlugin implements PluginBase {
|
||||||
Intent intent = new Intent(ACTION_NEW_EXTERNAL_STATUSLINE);
|
Intent intent = new Intent(ACTION_NEW_EXTERNAL_STATUSLINE);
|
||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
ctx.sendBroadcast(intent, RECEIVER_PERMISSION);
|
ctx.sendBroadcast(intent, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2 KiB |
BIN
app/src/main/res/drawable/icon_bolus.png
Normal file
BIN
app/src/main/res/drawable/icon_bolus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
app/src/main/res/drawable/icon_calculator.png
Normal file
BIN
app/src/main/res/drawable/icon_calculator.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
app/src/main/res/drawable/icon_calibration.png
Normal file
BIN
app/src/main/res/drawable/icon_calibration.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
app/src/main/res/drawable/icon_cancelbasal.png
Normal file
BIN
app/src/main/res/drawable/icon_cancelbasal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
app/src/main/res/drawable/icon_quickwizard.png
Normal file
BIN
app/src/main/res/drawable/icon_quickwizard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
|
@ -37,7 +37,7 @@
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:text="@string/careportal_temporarytarget"
|
android:text="@string/careportal_temporarytarget"
|
||||||
android:textColor="@color/colorWizardButton" />
|
android:textColor="@color/colorCalculatorButton" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/actions_settempbasal"
|
android:id="@+id/actions_settempbasal"
|
||||||
|
|
|
@ -314,8 +314,8 @@
|
||||||
android:id="@+id/overview_buttons"
|
android:id="@+id/overview_buttons"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentBottom="true">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/overview_accepttemplayout"
|
android:id="@+id/overview_accepttemplayout"
|
||||||
|
@ -329,35 +329,12 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginBottom="3dp"
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:text="Accept new temp\n0.25U/h"
|
android:text="Accept new temp\n0.25U/h"
|
||||||
android:textColor="@color/colorAcceptTempButton" />
|
android:textColor="@color/colorAcceptTempButton" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/overview_canceltemplayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/overview_canceltempbutton"
|
|
||||||
style="?android:attr/buttonStyle"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="3dp"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:layout_weight="0.5"
|
|
||||||
android:text="Cancel temp basal"
|
|
||||||
android:textColor="@color/colorCancelTempButton" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -366,63 +343,74 @@
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/overview_treatmentbutton"
|
android:id="@+id/overview_treatmentbutton"
|
||||||
style="?android:attr/buttonStyle"
|
style="?android:attr/buttonStyle"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="0px"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginRight="-4dp"
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
|
android:drawableTop="@drawable/icon_bolus"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
android:text="@string/overview_bolus_label"
|
android:text="@string/overview_bolus_label"
|
||||||
android:textColor="@color/colorTreatmentButton" />
|
android:textColor="@color/colorTreatmentButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/overview_wizardbutton"
|
android:id="@+id/overview_wizardbutton"
|
||||||
style="?android:attr/buttonStyle"
|
style="?android:attr/buttonStyle"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="0px"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginRight="-4dp"
|
||||||
android:layout_marginLeft="0dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
|
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/colorWizardButton" />
|
android:textColor="@color/colorCalculatorButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/overview_calibrationbutton"
|
android:id="@+id/overview_calibrationbutton"
|
||||||
style="?android:attr/buttonStyle"
|
style="?android:attr/buttonStyle"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="0px"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginRight="-4dp"
|
||||||
android:layout_marginLeft="0dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
|
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"
|
||||||
</LinearLayout>
|
android:textSize="10sp" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/overview_quickwizardbutton"
|
android:id="@+id/overview_quickwizardbutton"
|
||||||
style="?android:attr/buttonStyle"
|
style="?android:attr/buttonStyle"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="0px"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginRight="-4dp"
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:drawableLeft="@drawable/bread"
|
android:drawableTop="@drawable/icon_quickwizard"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
android:text="Quick wizard"
|
android:text="Quick wizard"
|
||||||
android:textColor="@color/colorCancelTempButton" />
|
android:textColor="@color/colorQuickWizardButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/overview_canceltempbutton"
|
||||||
|
style="?android:attr/buttonStyle"
|
||||||
|
android:layout_width="0px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:drawableTop="@drawable/icon_cancelbasal"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
|
android:text="Cancel temp basal"
|
||||||
|
android:textColor="@color/colorCancelTempButton"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -24,10 +24,10 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
card_view:srcCompat="@drawable/bread"
|
android:adjustViewBounds="false"
|
||||||
android:scaleType="fitStart"
|
|
||||||
android:cropToPadding="false"
|
android:cropToPadding="false"
|
||||||
android:adjustViewBounds="false" />
|
android:scaleType="fitStart"
|
||||||
|
card_view:srcCompat="@drawable/icon_quickwizard" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
|
|
@ -26,14 +26,15 @@
|
||||||
<color name="linearBlockBackground">#3e3d3d</color>
|
<color name="linearBlockBackground">#3e3d3d</color>
|
||||||
|
|
||||||
<color name="colorAcceptTempButton">#f4d700</color>
|
<color name="colorAcceptTempButton">#f4d700</color>
|
||||||
<color name="colorTreatmentButton">#FFB347</color>
|
<color name="colorTreatmentButton">#67dfe8</color>
|
||||||
<color name="colorWizardButton">#77dd77</color>
|
<color name="colorCalibrationButton">#e93057</color>
|
||||||
<color name="colorCancelTempButton">#47c8ff</color>
|
<color name="colorCalculatorButton">#67e86a</color>
|
||||||
|
<color name="colorQuickWizardButton">#ffae01</color>
|
||||||
|
<color name="colorCancelTempButton">#d08cff</color>
|
||||||
<color name="colorSetTempButton">#FF478EFF</color>
|
<color name="colorSetTempButton">#FF478EFF</color>
|
||||||
<color name="colorSetExtendedButton">#FFDD7792</color>
|
<color name="colorSetExtendedButton">#FFDD7792</color>
|
||||||
<color name="colorProfileSwitchButton">#ca77dd</color>
|
<color name="colorProfileSwitchButton">#ca77dd</color>
|
||||||
<color name="colorTempTargetButton">#d43429</color>
|
<color name="colorTempTargetButton">#d43429</color>
|
||||||
<color name="colorCalibrationButton">#ceb812</color>
|
|
||||||
|
|
||||||
<color name="colorInProgress">#c45026</color>
|
<color name="colorInProgress">#c45026</color>
|
||||||
<color name="colorAffectingIOB">#830400</color>
|
<color name="colorAffectingIOB">#830400</color>
|
||||||
|
|
Loading…
Reference in a new issue