diff --git a/app/src/main/ic_edit-web.png b/app/src/main/ic_edit-web.png
new file mode 100644
index 0000000000..561079948d
Binary files /dev/null and b/app/src/main/ic_edit-web.png differ
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java
index 4af04d95e4..3174c0f82f 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java
@@ -41,7 +41,9 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
EditText percentageView;
EditText timeshiftView;
TextView profileView;
- TextView baseprofileView;
+ TextView baseprofileIC;
+ TextView baseprofileBasal;
+ TextView baseprofileISF;
Button profileswitchButton;
@@ -59,7 +61,10 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
percentageView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_percentage);
timeshiftView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_timeshift);
profileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_profileview);
- baseprofileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofileview);
+ baseprofileBasal = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofilebasal);
+ baseprofileIC = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofileic);
+ baseprofileISF = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofileisf);
+
profileswitchButton = (Button) layout.findViewById(R.id.circadianpercentageprofile_profileswitch);
mgdlView.setChecked(circadianPercentageProfilePlugin.mgdl);
@@ -149,10 +154,9 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
sb.append("
ISF:
" + circadianPercentageProfilePlugin.isfString());
profileView.setText(Html.fromHtml(sb.toString()));
- baseprofileView.setText("Base Profile:\n");
- baseprofileView.append("Basal: " + circadianPercentageProfilePlugin.baseBasalString() + "\n");
- baseprofileView.append("IC: " + circadianPercentageProfilePlugin.baseIcString() + "\n");
- baseprofileView.append("ISF: " + circadianPercentageProfilePlugin.baseIsfString() + "\n");
+ baseprofileBasal.setText(Html.fromHtml("Base Profile:
Basal:
" + circadianPercentageProfilePlugin.baseBasalString()));
+ baseprofileIC.setText(Html.fromHtml("IC:
" + circadianPercentageProfilePlugin.baseIcString()));
+ baseprofileISF.setText(Html.fromHtml("ISF:
" + circadianPercentageProfilePlugin.baseIsfString()));
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java
index ec8f459f2c..9d48b9cc62 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java
@@ -269,6 +269,7 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
}
private static String profileString(double[] values, int timeshift, int percentage){
+ timeshift = -(timeshift%24) + 24;
StringBuilder sb = new StringBuilder();
sb.append(""); sb.append(0); sb.append("h: "); sb.append("");
sb.append(DecimalFormatter.to2Decimal(values[(timeshift+0)%24]*percentage/100d));
diff --git a/app/src/main/res/layout/circadianpercentageprofile_fragment.xml b/app/src/main/res/layout/circadianpercentageprofile_fragment.xml
index f0e33d15b3..d6dc7a2179 100644
--- a/app/src/main/res/layout/circadianpercentageprofile_fragment.xml
+++ b/app/src/main/res/layout/circadianpercentageprofile_fragment.xml
@@ -95,21 +95,101 @@
android:layout_gravity="center_horizontal"
android:textColor="@color/colorProfileSwitchButton" />
-
+ android:textAppearance="?android:attr/textAppearanceSmall">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_gravity="left|top"
+ android:layout_marginLeft="6dp">