extended bolus dialog
This commit is contained in:
parent
5f6a77983b
commit
3861bece54
14 changed files with 127 additions and 129 deletions
|
@ -15,6 +15,8 @@ public class PumpDescription {
|
||||||
|
|
||||||
public boolean isExtendedBolusCapable = true;
|
public boolean isExtendedBolusCapable = true;
|
||||||
public double extendedBolusStep = 0.1d;
|
public double extendedBolusStep = 0.1d;
|
||||||
|
public double extendedBolusDurationStep = 30;
|
||||||
|
public double extendedBolusMaxDuration = 12 * 60;
|
||||||
|
|
||||||
public boolean isTempBasalCapable = true;
|
public boolean isTempBasalCapable = true;
|
||||||
public int lowTempBasalStyle = PERCENT;
|
public int lowTempBasalStyle = PERCENT;
|
||||||
|
|
|
@ -29,15 +29,8 @@ import info.nightscout.utils.SafeParse;
|
||||||
|
|
||||||
public class NewExtendedBolusDialog extends DialogFragment implements View.OnClickListener {
|
public class NewExtendedBolusDialog extends DialogFragment implements View.OnClickListener {
|
||||||
|
|
||||||
Button okButton;
|
|
||||||
EditText insulinEdit;
|
|
||||||
RadioButton h05Radio;
|
|
||||||
RadioButton h10Radio;
|
|
||||||
RadioButton h20Radio;
|
|
||||||
RadioButton h30Radio;
|
|
||||||
RadioButton h40Radio;
|
|
||||||
|
|
||||||
PlusMinusEditText editInsulin;
|
PlusMinusEditText editInsulin;
|
||||||
|
PlusMinusEditText editDuration;
|
||||||
|
|
||||||
Handler mHandler;
|
Handler mHandler;
|
||||||
public static HandlerThread mHandlerThread;
|
public static HandlerThread mHandlerThread;
|
||||||
|
@ -54,18 +47,16 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
|
||||||
getDialog().setTitle(getString(R.string.overview_extendedbolus_button));
|
getDialog().setTitle(getString(R.string.overview_extendedbolus_button));
|
||||||
|
|
||||||
View view = inflater.inflate(R.layout.overview_newextendedbolus_dialog, container, false);
|
View view = inflater.inflate(R.layout.overview_newextendedbolus_dialog, container, false);
|
||||||
okButton = (Button) view.findViewById(R.id.overview_newextendedbolus_okbutton);
|
|
||||||
insulinEdit = (EditText) view.findViewById(R.id.overview_newextendedbolus_insulin);
|
|
||||||
h05Radio = (RadioButton) view.findViewById(R.id.overview_newextendedbolus_05h);
|
|
||||||
h10Radio = (RadioButton) view.findViewById(R.id.overview_newextendedbolus_1h);
|
|
||||||
h20Radio = (RadioButton) view.findViewById(R.id.overview_newextendedbolus_2h);
|
|
||||||
h30Radio = (RadioButton) view.findViewById(R.id.overview_newextendedbolus_3h);
|
|
||||||
h40Radio = (RadioButton) view.findViewById(R.id.overview_newextendedbolus_4h);
|
|
||||||
|
|
||||||
Double maxInsulin = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit);
|
Double maxInsulin = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit);
|
||||||
editInsulin = new PlusMinusEditText(view, R.id.overview_newextendedbolus_insulin, R.id.overview_newextendedbolus_insulin_plus, R.id.overview_newextendedbolus_insulin_minus, 0d, 0d, maxInsulin, 0.1d, new DecimalFormat("0.00"), false);
|
editInsulin = new PlusMinusEditText(view, R.id.overview_newextendedbolus_insulin, R.id.overview_newextendedbolus_insulin_plus, R.id.overview_newextendedbolus_insulin_minus, 0d, 0d, maxInsulin, 0.1d, new DecimalFormat("0.00"), false);
|
||||||
|
|
||||||
okButton.setOnClickListener(this);
|
double extendedDurationStep = MainApp.getConfigBuilder().getPumpDescription().extendedBolusDurationStep;
|
||||||
|
double extendedMaxDuration = MainApp.getConfigBuilder().getPumpDescription().extendedBolusMaxDuration;
|
||||||
|
editDuration = new PlusMinusEditText(view, R.id.overview_newextendedbolus_duration, R.id.overview_newextendedbolus_duration_plus, R.id.overview_newextendedbolus_duration_minus, extendedDurationStep, extendedDurationStep, extendedMaxDuration, extendedDurationStep, new DecimalFormat("0"), false);
|
||||||
|
|
||||||
|
view.findViewById(R.id.ok).setOnClickListener(this);
|
||||||
|
view.findViewById(R.id.cancel).setOnClickListener(this);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,14 +70,10 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.overview_newextendedbolus_okbutton:
|
case R.id.ok:
|
||||||
try {
|
try {
|
||||||
Double insulin = SafeParse.stringToDouble(insulinEdit.getText().toString());
|
Double insulin = SafeParse.stringToDouble(editInsulin.getText());
|
||||||
int durationInMinutes = 30;
|
int durationInMinutes = SafeParse.stringToInt(editDuration.getText());
|
||||||
if (h10Radio.isChecked()) durationInMinutes = 60;
|
|
||||||
if (h20Radio.isChecked()) durationInMinutes = 120;
|
|
||||||
if (h30Radio.isChecked()) durationInMinutes = 180;
|
|
||||||
if (h40Radio.isChecked()) durationInMinutes = 240;
|
|
||||||
|
|
||||||
String confirmMessage = getString(R.string.setextendedbolusquestion);
|
String confirmMessage = getString(R.string.setextendedbolusquestion);
|
||||||
|
|
||||||
|
@ -130,6 +117,10 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case R.id.cancel:
|
||||||
|
dismiss();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,6 @@ import info.nightscout.utils.SafeParse;
|
||||||
|
|
||||||
public class NewTreatmentDialog extends DialogFragment implements OnClickListener {
|
public class NewTreatmentDialog extends DialogFragment implements OnClickListener {
|
||||||
|
|
||||||
Button okButton;
|
|
||||||
Button cancelButton;
|
|
||||||
TextView insulin;
|
|
||||||
TextView carbs;
|
|
||||||
|
|
||||||
PlusMinusEditText editCarbs;
|
PlusMinusEditText editCarbs;
|
||||||
PlusMinusEditText editInsulin;
|
PlusMinusEditText editInsulin;
|
||||||
|
|
||||||
|
@ -55,15 +50,11 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.overview_newtreatment_dialog, null, false);
|
View view = inflater.inflate(R.layout.overview_newtreatment_dialog, null, false);
|
||||||
|
|
||||||
okButton = (Button) view.findViewById(R.id.ok);
|
view.findViewById(R.id.ok).setOnClickListener(this);
|
||||||
okButton.setOnClickListener(this);
|
view.findViewById(R.id.cancel).setOnClickListener(this);
|
||||||
cancelButton = (Button) view.findViewById(R.id.cancel);
|
|
||||||
cancelButton.setOnClickListener(this);
|
|
||||||
|
|
||||||
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
|
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
|
||||||
insulin = (TextView) view.findViewById(R.id.treatments_newtreatment_insulinamount);
|
|
||||||
carbs = (TextView) view.findViewById(R.id.treatments_newtreatment_carbsamount);
|
|
||||||
|
|
||||||
Integer maxCarbs = MainApp.getConfigBuilder().applyCarbsConstraints(Constants.carbsOnlyForCheckLimit);
|
Integer maxCarbs = MainApp.getConfigBuilder().applyCarbsConstraints(Constants.carbsOnlyForCheckLimit);
|
||||||
Double maxInsulin = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit);
|
Double maxInsulin = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit);
|
||||||
|
@ -87,8 +78,8 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
|
||||||
case R.id.ok:
|
case R.id.ok:
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Double insulin = SafeParse.stringToDouble(this.insulin.getText().toString());
|
Double insulin = SafeParse.stringToDouble(editInsulin.getText());
|
||||||
final Integer carbs = SafeParse.stringToInt(this.carbs.getText().toString());
|
final Integer carbs = SafeParse.stringToInt(editCarbs.getText());
|
||||||
|
|
||||||
String confirmMessage = getString(R.string.entertreatmentquestion) + "\n";
|
String confirmMessage = getString(R.string.entertreatmentquestion) + "\n";
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
|
|
||||||
pumpDescription.isExtendedBolusCapable = true;
|
pumpDescription.isExtendedBolusCapable = true;
|
||||||
pumpDescription.extendedBolusStep = 0.05d;
|
pumpDescription.extendedBolusStep = 0.05d;
|
||||||
|
pumpDescription.extendedBolusDurationStep = 30;
|
||||||
|
|
||||||
pumpDescription.isTempBasalCapable = true;
|
pumpDescription.isTempBasalCapable = true;
|
||||||
pumpDescription.lowTempBasalStyle = PumpDescription.PERCENT;
|
pumpDescription.lowTempBasalStyle = PumpDescription.PERCENT;
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class DanaRExecutionService extends Service {
|
||||||
private PowerManager.WakeLock mWakeLock;
|
private PowerManager.WakeLock mWakeLock;
|
||||||
private IBinder mBinder = new LocalBinder();
|
private IBinder mBinder = new LocalBinder();
|
||||||
|
|
||||||
private DanaRPump danaRPump;
|
private DanaRPump danaRPump = DanaRPump.getInstance();
|
||||||
private Treatment bolusingTreatment = null;
|
private Treatment bolusingTreatment = null;
|
||||||
|
|
||||||
private static Boolean connectionInProgress = false;
|
private static Boolean connectionInProgress = false;
|
||||||
|
@ -124,7 +124,6 @@ public class DanaRExecutionService extends Service {
|
||||||
public DanaRExecutionService() {
|
public DanaRExecutionService() {
|
||||||
registerBus();
|
registerBus();
|
||||||
MainApp.instance().getApplicationContext().registerReceiver(receiver, new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED));
|
MainApp.instance().getApplicationContext().registerReceiver(receiver, new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED));
|
||||||
danaRPump = DanaRPump.getInstance();
|
|
||||||
|
|
||||||
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
||||||
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "DanaRExecutionService");
|
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "DanaRExecutionService");
|
||||||
|
@ -404,6 +403,7 @@ public class DanaRExecutionService extends Service {
|
||||||
Calendar time = Calendar.getInstance();
|
Calendar time = Calendar.getInstance();
|
||||||
mSerialIOThread.sendMessage(new MsgSetCarbsEntry(time, carbs));
|
mSerialIOThread.sendMessage(new MsgSetCarbsEntry(time, carbs));
|
||||||
}
|
}
|
||||||
|
|
||||||
MsgBolusProgress progress = new MsgBolusProgress(amount, t); // initialize static variables
|
MsgBolusProgress progress = new MsgBolusProgress(amount, t); // initialize static variables
|
||||||
MainApp.bus().post(new EventDanaRBolusStart());
|
MainApp.bus().post(new EventDanaRBolusStart());
|
||||||
long startTime = new Date().getTime();
|
long startTime = new Date().getTime();
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
|
||||||
|
|
||||||
pumpDescription.isExtendedBolusCapable = true;
|
pumpDescription.isExtendedBolusCapable = true;
|
||||||
pumpDescription.extendedBolusStep = 0.05d;
|
pumpDescription.extendedBolusStep = 0.05d;
|
||||||
|
pumpDescription.extendedBolusDurationStep = 30;
|
||||||
|
|
||||||
pumpDescription.isTempBasalCapable = true;
|
pumpDescription.isTempBasalCapable = true;
|
||||||
pumpDescription.lowTempBasalStyle = PumpDescription.PERCENT;
|
pumpDescription.lowTempBasalStyle = PumpDescription.PERCENT;
|
||||||
|
|
|
@ -219,7 +219,7 @@ public class DanaRKoreanExecutionService extends Service {
|
||||||
mSerialIOThread.disconnect("Recreate SerialIOThread");
|
mSerialIOThread.disconnect("Recreate SerialIOThread");
|
||||||
}
|
}
|
||||||
mSerialIOThread = new SerialIOThread(mRfcommSocket);
|
mSerialIOThread = new SerialIOThread(mRfcommSocket);
|
||||||
MainApp.bus().post(new EventPumpStatusChanged(EventPumpStatusChanged.CONNECTED));
|
MainApp.bus().post(new EventPumpStatusChanged(EventPumpStatusChanged.CONNECTED, 0));
|
||||||
if (!getPumpStatus()) {
|
if (!getPumpStatus()) {
|
||||||
mSerialIOThread.disconnect("getPumpStatus failed");
|
mSerialIOThread.disconnect("getPumpStatus failed");
|
||||||
waitMsec(3000);
|
waitMsec(3000);
|
||||||
|
@ -385,7 +385,7 @@ public class DanaRKoreanExecutionService extends Service {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean bolus(Double amount, int carbs, Treatment t) {
|
public boolean bolus(double amount, int carbs, Treatment t) {
|
||||||
bolusingTreatment = t;
|
bolusingTreatment = t;
|
||||||
MsgBolusStart start = new MsgBolusStart(amount);
|
MsgBolusStart start = new MsgBolusStart(amount);
|
||||||
MsgBolusStop stop = new MsgBolusStop(amount, t);
|
MsgBolusStop stop = new MsgBolusStop(amount, t);
|
||||||
|
|
|
@ -83,6 +83,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, ConstraintsInte
|
||||||
|
|
||||||
pumpDescription.isExtendedBolusCapable = true;
|
pumpDescription.isExtendedBolusCapable = true;
|
||||||
pumpDescription.extendedBolusStep = 0.05d;
|
pumpDescription.extendedBolusStep = 0.05d;
|
||||||
|
pumpDescription.extendedBolusDurationStep = 30;
|
||||||
|
|
||||||
pumpDescription.isTempBasalCapable = true;
|
pumpDescription.isTempBasalCapable = true;
|
||||||
pumpDescription.lowTempBasalStyle = PumpDescription.PERCENT;
|
pumpDescription.lowTempBasalStyle = PumpDescription.PERCENT;
|
||||||
|
|
|
@ -371,7 +371,7 @@ public class DanaRv2ExecutionService extends Service {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean bolus(Double amount, int carbs, Treatment t) {
|
public boolean bolus(double amount, int carbs, Treatment t) {
|
||||||
bolusingTreatment = t;
|
bolusingTreatment = t;
|
||||||
MsgBolusStart start = new MsgBolusStart(amount);
|
MsgBolusStart start = new MsgBolusStart(amount);
|
||||||
MsgBolusStop stop = new MsgBolusStop(amount, t);
|
MsgBolusStop stop = new MsgBolusStop(amount, t);
|
||||||
|
|
|
@ -39,26 +39,8 @@ public class MDIPlugin implements PluginBase, PumpInterface {
|
||||||
pumpDescription.bolusStep = 0.5d;
|
pumpDescription.bolusStep = 0.5d;
|
||||||
|
|
||||||
pumpDescription.isExtendedBolusCapable = false;
|
pumpDescription.isExtendedBolusCapable = false;
|
||||||
pumpDescription.extendedBolusStep = 0d;
|
|
||||||
|
|
||||||
pumpDescription.isTempBasalCapable = false;
|
pumpDescription.isTempBasalCapable = false;
|
||||||
pumpDescription.lowTempBasalStyle = PumpDescription.NONE;
|
|
||||||
pumpDescription.highTempBasalStyle = PumpDescription.NONE;
|
|
||||||
pumpDescription.maxHighTempPercent = 0;
|
|
||||||
pumpDescription.maxHighTempAbsolute = 0;
|
|
||||||
pumpDescription.lowTempPercentStep = 0;
|
|
||||||
pumpDescription.lowTempAbsoluteStep = 0;
|
|
||||||
pumpDescription.lowTempPercentDuration = 0;
|
|
||||||
pumpDescription.lowTempAbsoluteDuration = 0;
|
|
||||||
pumpDescription.highTempPercentStep = 0;
|
|
||||||
pumpDescription.highTempAbsoluteStep = 0d;
|
|
||||||
pumpDescription.highTempPercentDuration = 0;
|
|
||||||
pumpDescription.highTempAbsoluteDuration = 0;
|
|
||||||
|
|
||||||
pumpDescription.isSetBasalProfileCapable = false;
|
pumpDescription.isSetBasalProfileCapable = false;
|
||||||
pumpDescription.basalStep = 0d;
|
|
||||||
pumpDescription.basalMinimumRate = 0d;
|
|
||||||
|
|
||||||
pumpDescription.isRefillingCapable = false;
|
pumpDescription.isRefillingCapable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
||||||
|
|
||||||
pumpDescription.isExtendedBolusCapable = true;
|
pumpDescription.isExtendedBolusCapable = true;
|
||||||
pumpDescription.extendedBolusStep = 0.2d;
|
pumpDescription.extendedBolusStep = 0.2d;
|
||||||
|
pumpDescription.extendedBolusDurationStep = 30;
|
||||||
|
|
||||||
pumpDescription.isTempBasalCapable = true;
|
pumpDescription.isTempBasalCapable = true;
|
||||||
pumpDescription.lowTempBasalStyle = PumpDescription.ABSOLUTE | PumpDescription.PERCENT;
|
pumpDescription.lowTempBasalStyle = PumpDescription.ABSOLUTE | PumpDescription.PERCENT;
|
||||||
|
@ -72,7 +73,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
||||||
|
|
||||||
pumpDescription.isSetBasalProfileCapable = true;
|
pumpDescription.isSetBasalProfileCapable = true;
|
||||||
pumpDescription.basalStep = 0.01d;
|
pumpDescription.basalStep = 0.01d;
|
||||||
pumpDescription.basalMinimumRate = 0.04d;
|
pumpDescription.basalMinimumRate = 0.01d;
|
||||||
|
|
||||||
pumpDescription.isRefillingCapable = false;
|
pumpDescription.isRefillingCapable = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,6 +116,10 @@ public class PlusMinusEditText implements View.OnKeyListener,
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return editText.getText().toString();
|
||||||
|
}
|
||||||
|
|
||||||
public void setStep(Double step) {
|
public void setStep(Double step) {
|
||||||
this.step = step;
|
this.step = step;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,29 +9,31 @@
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="10dp">
|
android:padding="10dp">
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_alignParentStart="true"
|
||||||
android:padding="10dp"
|
|
||||||
android:text="@string/treatments_newtreatment_insulinamount_label"
|
android:text="@string/treatments_newtreatment_insulinamount_label"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -49,12 +51,12 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:inputType="numberDecimal"
|
android:inputType="numberDecimal"
|
||||||
android:minWidth="100dp"
|
android:minWidth="100dp"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/overview_newextendedbolus_insulin_plus"
|
android:id="@+id/overview_newextendedbolus_insulin_plus"
|
||||||
|
@ -67,55 +69,77 @@
|
||||||
android:tint="#ffffff" />
|
android:tint="#ffffff" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
<View
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="2dip"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
<RadioGroup
|
</RelativeLayout>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal">
|
|
||||||
|
|
||||||
<RadioButton
|
<RelativeLayout
|
||||||
android:id="@+id/overview_newextendedbolus_05h"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="0.5 h" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/overview_newextendedbolus_1h"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="1 h" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/overview_newextendedbolus_2h"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="2 h" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/overview_newextendedbolus_3h"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="3 h" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/overview_newextendedbolus_4h"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="4 h" />
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/overview_newextendedbolus_okbutton"
|
|
||||||
style="?android:attr/buttonStyle"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:padding="10dp"
|
|
||||||
android:text="OK"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:text="@string/careportal_newnstreatment_duration_label"
|
||||||
|
android:textAppearance="@android:style/TextAppearance.Material.Small"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/overview_newextendedbolus_duration_minus"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/circle"
|
||||||
|
android:backgroundTint="#ffffff"
|
||||||
|
android:src="@drawable/ic_action_minus"
|
||||||
|
android:tint="#ffffff" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/overview_newextendedbolus_duration"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
android:minWidth="100dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text=""
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/overview_newextendedbolus_duration_plus"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/circle"
|
||||||
|
android:backgroundTint="#ffffff"
|
||||||
|
android:src="@drawable/ic_action_add"
|
||||||
|
android:tint="#ffffff" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<include layout="@layout/mdtp_done_button" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
|
@ -64,8 +64,8 @@
|
||||||
android:id="@+id/overview_newtempbasal_percent_layout"
|
android:id="@+id/overview_newtempbasal_percent_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_gravity="center_horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -73,11 +73,11 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="0.5"
|
||||||
android:background="@drawable/circle"
|
android:background="@drawable/circle"
|
||||||
android:backgroundTint="#ffffff"
|
android:backgroundTint="#ffffff"
|
||||||
android:src="@drawable/ic_action_minus"
|
android:src="@drawable/ic_action_minus"
|
||||||
android:tint="#ffffff"
|
android:tint="#ffffff" />
|
||||||
android:layout_weight="0.5" />
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/overview_newtempbasal_basalpercentinput"
|
android:id="@+id/overview_newtempbasal_basalpercentinput"
|
||||||
|
@ -85,23 +85,23 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:inputType="numberDecimal"
|
android:inputType="numberDecimal"
|
||||||
android:minWidth="100dp"
|
android:minWidth="100dp"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/overview_newtempbasal_basalpercent_plus"
|
android:id="@+id/overview_newtempbasal_basalpercent_plus"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="0.5"
|
||||||
android:background="@drawable/circle"
|
android:background="@drawable/circle"
|
||||||
android:backgroundTint="#ffffff"
|
android:backgroundTint="#ffffff"
|
||||||
android:src="@drawable/ic_action_add"
|
android:src="@drawable/ic_action_add"
|
||||||
android:tint="#ffffff"
|
android:tint="#ffffff" />
|
||||||
android:layout_weight="0.5" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -110,8 +110,8 @@
|
||||||
android:id="@+id/overview_newtempbasal_absolute_layout"
|
android:id="@+id/overview_newtempbasal_absolute_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_gravity="center_horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -119,11 +119,11 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="0.5"
|
||||||
android:background="@drawable/circle"
|
android:background="@drawable/circle"
|
||||||
android:backgroundTint="#ffffff"
|
android:backgroundTint="#ffffff"
|
||||||
android:src="@drawable/ic_action_minus"
|
android:src="@drawable/ic_action_minus"
|
||||||
android:tint="#ffffff"
|
android:tint="#ffffff" />
|
||||||
android:layout_weight="0.5" />
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/overview_newtempbasal_basalabsoluteinput"
|
android:id="@+id/overview_newtempbasal_basalabsoluteinput"
|
||||||
|
@ -131,23 +131,23 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:inputType="numberDecimal"
|
android:inputType="numberDecimal"
|
||||||
android:minWidth="100dp"
|
android:minWidth="100dp"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/overview_newtempbasal_basalabsolute_plus"
|
android:id="@+id/overview_newtempbasal_basalabsolute_plus"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="0.5"
|
||||||
android:background="@drawable/circle"
|
android:background="@drawable/circle"
|
||||||
android:backgroundTint="#ffffff"
|
android:backgroundTint="#ffffff"
|
||||||
android:src="@drawable/ic_action_add"
|
android:src="@drawable/ic_action_add"
|
||||||
android:tint="#ffffff"
|
android:tint="#ffffff" />
|
||||||
android:layout_weight="0.5" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
Loading…
Reference in a new issue