Merge branch 'dev' into history

This commit is contained in:
Milos Kozak 2017-05-12 13:05:57 +02:00
commit e005d6bd69
13 changed files with 62 additions and 77 deletions

View file

@ -2,8 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
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.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

View file

@ -148,7 +148,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
RecyclerView notificationsView;
LinearLayoutManager llm;
LinearLayout cancelTempLayout;
LinearLayout acceptTempLayout;
Button cancelTempButton;
Button treatmentButton;
@ -231,7 +230,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
calibrationButton = (Button) view.findViewById(R.id.overview_calibrationbutton);
calibrationButton.setOnClickListener(this);
cancelTempLayout = (LinearLayout) view.findViewById(R.id.overview_canceltemplayout);
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
showPredictionView = (CheckBox) view.findViewById(R.id.overview_showprediction);
@ -885,12 +883,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
TempBasal activeTemp = pump.getTempBasal();
if (pump.isTempBasalInProgress()) {
cancelTempLayout.setVisibility(View.VISIBLE);
cancelTempButton.setText(MainApp.instance().getString(R.string.cancel) + ": " + activeTemp.toString());
cancelTempButton.setVisibility(View.VISIBLE);
cancelTempButton.setText(MainApp.instance().getString(R.string.cancel) + "\n" + activeTemp.toStringShort());
runningTempView.setVisibility(View.VISIBLE);
runningTempView.setText(activeTemp.toString());
} else {
cancelTempLayout.setVisibility(View.GONE);
cancelTempButton.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();
if (quickWizardEntry != null && lastBG != null && pump.isInitialized() && !pump.isSuspended()) {
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();
wizard.doCalc(profile.getDefaultProfile(), quickWizardEntry.carbs(), 0d, lastBG.valueToUnits(profile.getUnits()), 0d, true, true, false, false);
text += " " + DecimalFormatter.to2Decimal(wizard.calculatedTotalInsulin) + "U";

View file

@ -140,7 +140,7 @@ public class StatuslinePlugin implements PluginBase {
Intent intent = new Intent(ACTION_NEW_EXTERNAL_STATUSLINE);
intent.putExtras(bundle);
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
ctx.sendBroadcast(intent, RECEIVER_PERMISSION);
ctx.sendBroadcast(intent, null);
}
@NonNull

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -37,7 +37,7 @@
android:layout_marginTop="3dp"
android:layout_weight="0.5"
android:text="@string/careportal_temporarytarget"
android:textColor="@color/colorWizardButton" />
android:textColor="@color/colorCalculatorButton" />
<Button
android:id="@+id/actions_settempbasal"

View file

@ -314,8 +314,8 @@
android:id="@+id/overview_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true">
android:layout_alignParentBottom="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/overview_accepttemplayout"
@ -329,35 +329,12 @@
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="Accept new temp\n0.25U/h"
android:textColor="@color/colorAcceptTempButton" />
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -366,63 +343,74 @@
<Button
android:id="@+id/overview_treatmentbutton"
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_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_bolus_label"
android:textColor="@color/colorTreatmentButton" />
android:textColor="@color/colorTreatmentButton"
android:textSize="10sp" />
<Button
android:id="@+id/overview_wizardbutton"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="5dp"
android:layout_marginTop="3dp"
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/colorWizardButton" />
android:textColor="@color/colorCalculatorButton"
android:textSize="10sp" />
<Button
android:id="@+id/overview_calibrationbutton"
style="?android:attr/buttonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="5dp"
android:layout_marginTop="3dp"
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" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:textColor="@color/colorCalibrationButton"
android:textSize="10sp" />
<Button
android:id="@+id/overview_quickwizardbutton"
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_width="0px"
android:layout_height="fill_parent"
android:layout_marginRight="-4dp"
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: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>
</RelativeLayout>
</FrameLayout>

View file

@ -24,10 +24,10 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
card_view:srcCompat="@drawable/bread"
android:scaleType="fitStart"
android:adjustViewBounds="false"
android:cropToPadding="false"
android:adjustViewBounds="false" />
android:scaleType="fitStart"
card_view:srcCompat="@drawable/icon_quickwizard" />
<LinearLayout
android:orientation="vertical"

View file

@ -26,14 +26,15 @@
<color name="linearBlockBackground">#3e3d3d</color>
<color name="colorAcceptTempButton">#f4d700</color>
<color name="colorTreatmentButton">#FFB347</color>
<color name="colorWizardButton">#77dd77</color>
<color name="colorCancelTempButton">#47c8ff</color>
<color name="colorTreatmentButton">#67dfe8</color>
<color name="colorCalibrationButton">#e93057</color>
<color name="colorCalculatorButton">#67e86a</color>
<color name="colorQuickWizardButton">#ffae01</color>
<color name="colorCancelTempButton">#d08cff</color>
<color name="colorSetTempButton">#FF478EFF</color>
<color name="colorSetExtendedButton">#FFDD7792</color>
<color name="colorProfileSwitchButton">#ca77dd</color>
<color name="colorTempTargetButton">#d43429</color>
<color name="colorCalibrationButton">#ceb812</color>
<color name="colorInProgress">#c45026</color>
<color name="colorAffectingIOB">#830400</color>