fix treatment dialog in careportal
This commit is contained in:
parent
f1564519d3
commit
81e82143fc
1 changed files with 13 additions and 11 deletions
|
@ -134,17 +134,6 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
layoutCarbTime = (LinearLayout) view.findViewById(R.id.careportal_newnstreatment_carbtime_layout);
|
layoutCarbTime = (LinearLayout) view.findViewById(R.id.careportal_newnstreatment_carbtime_layout);
|
||||||
layoutProfile = (LinearLayout) view.findViewById(R.id.careportal_newnstreatment_profile_layout);
|
layoutProfile = (LinearLayout) view.findViewById(R.id.careportal_newnstreatment_profile_layout);
|
||||||
|
|
||||||
showOrHide(layoutBg, options.bg);
|
|
||||||
showOrHide(layoutBgSource, options.bg);
|
|
||||||
showOrHide(layoutInsulin, options.insulin);
|
|
||||||
showOrHide(layoutCarbs, options.carbs);
|
|
||||||
showOrHide(layoutSplit, options.split);
|
|
||||||
showOrHide(layoutDuration, options.duration);
|
|
||||||
showOrHide(layoutPercent, options.percent);
|
|
||||||
showOrHide(layoutAbsolute, options.absolute);
|
|
||||||
showOrHide(layoutCarbTime, options.prebolus);
|
|
||||||
showOrHide(layoutProfile, options.profile);
|
|
||||||
|
|
||||||
bgUnitsView = (TextView) view.findViewById(R.id.careportal_newnstreatment_bgunits);
|
bgUnitsView = (TextView) view.findViewById(R.id.careportal_newnstreatment_bgunits);
|
||||||
meterRadioButton = (RadioButton) view.findViewById(R.id.careportal_newnstreatment_meter);
|
meterRadioButton = (RadioButton) view.findViewById(R.id.careportal_newnstreatment_meter);
|
||||||
sensorRadioButton = (RadioButton) view.findViewById(R.id.careportal_newnstreatment_sensor);
|
sensorRadioButton = (RadioButton) view.findViewById(R.id.careportal_newnstreatment_sensor);
|
||||||
|
@ -168,6 +157,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start,
|
public void onTextChanged(CharSequence s, int start,
|
||||||
int before, int count) {
|
int before, int count) {
|
||||||
|
layoutPercent.setVisibility(View.VISIBLE);
|
||||||
layoutAbsolute.setVisibility(View.GONE);
|
layoutAbsolute.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -186,6 +176,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
public void onTextChanged(CharSequence s, int start,
|
public void onTextChanged(CharSequence s, int start,
|
||||||
int before, int count) {
|
int before, int count) {
|
||||||
layoutPercent.setVisibility(View.GONE);
|
layoutPercent.setVisibility(View.GONE);
|
||||||
|
layoutAbsolute.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
durationeEdit = (EditText) view.findViewById(R.id.careportal_newnstreatment_durationinput);
|
durationeEdit = (EditText) view.findViewById(R.id.careportal_newnstreatment_durationinput);
|
||||||
|
@ -263,6 +254,17 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
|
|
||||||
editCarbTime = new PlusMinusEditText(view, R.id.careportal_newnstreatment_carbtimeinput, R.id.careportal_newnstreatment_carbtime_plus, R.id.careportal_newnstreatment_carbtime_minus, 0d, -60d, 60d, 5d, new DecimalFormat("0"), false);
|
editCarbTime = new PlusMinusEditText(view, R.id.careportal_newnstreatment_carbtimeinput, R.id.careportal_newnstreatment_carbtime_plus, R.id.careportal_newnstreatment_carbtime_minus, 0d, -60d, 60d, 5d, new DecimalFormat("0"), false);
|
||||||
|
|
||||||
|
showOrHide(layoutBg, options.bg);
|
||||||
|
showOrHide(layoutBgSource, options.bg);
|
||||||
|
showOrHide(layoutInsulin, options.insulin);
|
||||||
|
showOrHide(layoutCarbs, options.carbs);
|
||||||
|
showOrHide(layoutSplit, options.split);
|
||||||
|
showOrHide(layoutDuration, options.duration);
|
||||||
|
showOrHide(layoutPercent, options.percent);
|
||||||
|
showOrHide(layoutAbsolute, options.absolute);
|
||||||
|
showOrHide(layoutCarbTime, options.prebolus);
|
||||||
|
showOrHide(layoutProfile, options.profile);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue