diff --git a/app/src/main/ic_copyprev-web.png b/app/src/main/ic_copyprev-web.png new file mode 100644 index 0000000000..d32f31327c Binary files /dev/null and b/app/src/main/ic_copyprev-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 61830ff70b..963443e0b4 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 @@ -1,9 +1,13 @@ package info.nightscout.androidaps.plugins.CircadianPercentageProfile; +import android.app.Dialog; import android.content.Context; +import android.content.DialogInterface; import android.os.Bundle; +import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; +import android.support.v7.app.AlertDialog; import android.text.Editable; import android.text.Html; import android.text.TextWatcher; @@ -14,16 +18,19 @@ import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.RadioButton; import android.widget.TextView; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.w3c.dom.Text; import info.nightscout.androidaps.R; import info.nightscout.androidaps.interfaces.FragmentBase; import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog; import info.nightscout.androidaps.plugins.Careportal.OptionsToShow; +import info.nightscout.utils.DecimalFormatter; import info.nightscout.utils.SafeParse; import info.nightscout.utils.ToastUtils; @@ -51,6 +58,10 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag Button profileswitchButton; ImageView percentageIcon; ImageView timeIcon; + ImageView basaleditIcon; + ImageView iceditIcon; + ImageView isfeditIcon; + @@ -74,6 +85,12 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag timeIcon = (ImageView) layout.findViewById(R.id.circadianpercentageprofile_timeicon); profileswitchButton = (Button) layout.findViewById(R.id.circadianpercentageprofile_profileswitch); + basaleditIcon = (ImageView) layout.findViewById(R.id.circadianpercentageprofile_basaledit); + iceditIcon = (ImageView) layout.findViewById(R.id.circadianpercentageprofile_icedit); + isfeditIcon = (ImageView) layout.findViewById(R.id.circadianpercentageprofile_isfedit); + + + mgdlView.setChecked(circadianPercentageProfilePlugin.mgdl); mmolView.setChecked(circadianPercentageProfilePlugin.mmol); diaView.setText(circadianPercentageProfilePlugin.dia.toString()); @@ -153,6 +170,14 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag } }); + basaleditIcon.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + BasalEditDialog basalEditDialog = new BasalEditDialog(); + basalEditDialog.show(getFragmentManager(), "Edit Basal"); + } + }); + TextWatcher textWatch = new TextWatcher() { @@ -209,4 +234,36 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag baseprofileISF.setText(Html.fromHtml("