From 526034292e0cce2fe4f919e2ddbe2c83c97fce0e Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 19 Dec 2019 23:45:27 +0100 Subject: [PATCH] FillDialog refactor --- .../general/actions/dialogs/CareDialog.kt | 10 +- .../general/actions/dialogs/FillDialog.java | 255 ------------------ .../general/actions/dialogs/FillDialog.kt | 130 +++++++++ .../dialogs/DialogFragmentWithDate.kt | 10 +- .../overview/dialogs/ProfileSwitchDialog.kt | 3 +- .../main/res/layout/actions_care_dialog.xml | 25 +- .../main/res/layout/actions_fill_dialog.xml | 82 +++--- app/src/main/res/layout/notes.xml | 25 ++ .../layout/overview_profileswitch_dialog.xml | 24 +- .../res/layout/overview_temptarget_dialog.xml | 2 +- 10 files changed, 206 insertions(+), 360 deletions(-) delete mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java create mode 100644 app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.kt create mode 100644 app/src/main/res/layout/notes.xml diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/CareDialog.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/CareDialog.kt index 27651710ac..1597d13959 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/CareDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/CareDialog.kt @@ -20,6 +20,7 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus import info.nightscout.androidaps.utils.* import kotlinx.android.synthetic.main.actions_care_dialog.* import kotlinx.android.synthetic.main.okcancel.* +import kotlinx.android.synthetic.main.notes.* import org.json.JSONObject import java.text.DecimalFormat import java.util.* @@ -89,10 +90,10 @@ class CareDialog : DialogFragmentWithDate() { if (ProfileFunctions.getSystemUnits() == Constants.MMOL) actions_care_bg.setParams(savedInstanceState?.getDouble("actions_care_bg") - ?: bg, 0.0, 30.0, 0.1, DecimalFormat("0.0"), false, ok, bgTextWatcher) + ?: bg, 36.0, 30.0, 0.1, DecimalFormat("0.0"), false, ok, bgTextWatcher) else actions_care_bg.setParams(savedInstanceState?.getDouble("actions_care_bg") - ?: bg, 0.0, 500.0, 1.0, DecimalFormat("0"), false, ok, bgTextWatcher) + ?: bg, 2.0, 500.0, 1.0, DecimalFormat("0"), false, ok, bgTextWatcher) } override fun submit() { @@ -114,14 +115,13 @@ class CareDialog : DialogFragmentWithDate() { json.put("glucose", actions_care_bg.value) json.put("glucoseType", type) } - val notes = actions_care_notes.text.toString() + val notes = notes.text.toString() if (notes.isNotEmpty()) { actions.add(MainApp.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes) json.put("notes", notes) } - if (eventTimeChanged) { + if (eventTimeChanged) actions.add(MainApp.gs(R.string.time) + ": " + DateUtil.dateAndTimeString(eventTime)) - } json.put("created_at", DateUtil.toISOString(eventTime)) json.put("eventType", when (options) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java deleted file mode 100644 index 77e4f85ea0..0000000000 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java +++ /dev/null @@ -1,255 +0,0 @@ -package info.nightscout.androidaps.plugins.general.actions.dialogs; - -import android.content.Context; -import android.content.Intent; -import android.os.Bundle; -import androidx.fragment.app.DialogFragment; -import androidx.appcompat.app.AlertDialog; -import android.text.Editable; -import android.text.Html; -import android.text.TextWatcher; -import android.view.LayoutInflater; -import android.view.View; -import android.view.View.OnClickListener; -import android.view.ViewGroup; -import android.view.Window; -import android.view.WindowManager; -import android.widget.Button; -import android.widget.CheckBox; -import android.widget.EditText; -import android.widget.LinearLayout; - -import com.google.common.base.Joiner; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.LinkedList; -import java.util.List; - -import info.nightscout.androidaps.MainApp; -import info.nightscout.androidaps.R; -import info.nightscout.androidaps.data.DetailedBolusInfo; -import info.nightscout.androidaps.db.CareportalEvent; -import info.nightscout.androidaps.db.Source; -import info.nightscout.androidaps.interfaces.Constraint; -import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin; -import info.nightscout.androidaps.plugins.general.nsclient.NSUpload; -import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity; -import info.nightscout.androidaps.queue.Callback; -import info.nightscout.androidaps.utils.DecimalFormatter; -import info.nightscout.androidaps.utils.NumberPicker; -import info.nightscout.androidaps.utils.SP; -import info.nightscout.androidaps.utils.SafeParse; -import info.nightscout.androidaps.utils.ToastUtils; - -import static info.nightscout.androidaps.utils.DateUtil.now; - -public class FillDialog extends DialogFragment implements OnClickListener { - private static Logger log = LoggerFactory.getLogger(FillDialog.class); - - private CheckBox pumpSiteChangeCheckbox; - private CheckBox insulinCartridgeChangeCheckbox; - - private NumberPicker editInsulin; - - double amount1 = 0d; - double amount2 = 0d; - double amount3 = 0d; - - private EditText notesEdit; - - //one shot guards - private boolean accepted; - private boolean okClicked; - - final private TextWatcher textWatcher = new TextWatcher() { - @Override - public void afterTextChanged(Editable s) { - validateInputs(); - } - - @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) { - } - - @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - } - }; - - private void validateInputs() { - int time = editInsulin.getValue().intValue(); - if (Math.abs(time) > 12 * 60) { - editInsulin.setValue(0d); - ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.constraintapllied)); - } - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.actions_fill_dialog, container, false); - - view.findViewById(R.id.ok).setOnClickListener(this); - view.findViewById(R.id.cancel).setOnClickListener(this); - - getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); - getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); - - pumpSiteChangeCheckbox = view.findViewById(R.id.fill_catheter_change); - insulinCartridgeChangeCheckbox = view.findViewById(R.id.fill_cartridge_change); - - Double maxInsulin = MainApp.getConstraintChecker().getMaxBolusAllowed().value(); - double bolusstep = ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription().bolusStep; - editInsulin = view.findViewById(R.id.fill_insulinamount); - editInsulin.setParams(0d, 0d, maxInsulin, bolusstep, DecimalFormatter.pumpSupportedBolusFormat(), false, view.findViewById(R.id.ok), textWatcher); - - - Button preset1Button = view.findViewById(R.id.fill_preset_button1); - amount1 = SP.getDouble("fill_button1", 0.3); - if (amount1 > 0) { - preset1Button.setVisibility(View.VISIBLE); - preset1Button.setText(DecimalFormatter.toPumpSupportedBolus(amount1)); // + "U"); - preset1Button.setOnClickListener(this); - } else { - preset1Button.setVisibility(View.GONE); - } - Button preset2Button = view.findViewById(R.id.fill_preset_button2); - amount2 = SP.getDouble("fill_button2", 0d); - if (amount2 > 0) { - preset2Button.setVisibility(View.VISIBLE); - preset2Button.setText(DecimalFormatter.toPumpSupportedBolus(amount2)); // + "U"); - preset2Button.setOnClickListener(this); - } else { - preset2Button.setVisibility(View.GONE); - } - Button preset3Button = view.findViewById(R.id.fill_preset_button3); - amount3 = SP.getDouble("fill_button3", 0d); - if (amount3 > 0) { - preset3Button.setVisibility(View.VISIBLE); - preset3Button.setText(DecimalFormatter.toPumpSupportedBolus(amount3)); // + "U"); - preset3Button.setOnClickListener(this); - } else { - preset3Button.setVisibility(View.GONE); - } - - LinearLayout notesLayout = view.findViewById(R.id.fill_notes_layout); - notesLayout.setVisibility(SP.getBoolean(R.string.key_show_notes_entry_dialogs, false) ? View.VISIBLE : View.GONE); - notesEdit = view.findViewById(R.id.fill_notes); - - setCancelable(true); - getDialog().setCanceledOnTouchOutside(false); - return view; - } - - @Override - public void onClick(View view) { - switch (view.getId()) { - case R.id.ok: - confirmAndDeliver(); - break; - case R.id.cancel: - dismiss(); - break; - case R.id.fill_preset_button1: - editInsulin.setValue(amount1); - break; - case R.id.fill_preset_button2: - editInsulin.setValue(amount2); - break; - case R.id.fill_preset_button3: - editInsulin.setValue(amount3); - break; - } - - } - - private synchronized void confirmAndDeliver() { - if (okClicked) { - log.debug("guarding: ok already clicked"); - dismiss(); - return; - } - okClicked = true; - - try { - Double insulin = SafeParse.stringToDouble(editInsulin.getText()); - - List confirmMessage = new LinkedList<>(); - - Double insulinAfterConstraints = MainApp.getConstraintChecker().applyBolusConstraints(new Constraint<>(insulin)).value(); - if (insulinAfterConstraints > 0) { - confirmMessage.add(MainApp.gs(R.string.fillwarning)); - confirmMessage.add(""); - confirmMessage.add(MainApp.gs(R.string.bolus) + ": " + "" + DecimalFormatter.toPumpSupportedBolus(insulinAfterConstraints) + "U" + ""); - if (Math.abs(insulinAfterConstraints - insulin) > 0.01d) - confirmMessage.add(MainApp.gs(R.string.bolusconstraintappliedwarning, MainApp.gc(R.color.warning), insulin, insulinAfterConstraints)); - } - - if (pumpSiteChangeCheckbox.isChecked()) - confirmMessage.add("" + "" + MainApp.gs(R.string.record_pump_site_change) + ""); - - if (insulinCartridgeChangeCheckbox.isChecked()) - confirmMessage.add("" + "" + MainApp.gs(R.string.record_insulin_cartridge_change) + ""); - - final String notes = notesEdit.getText().toString(); - if (!notes.isEmpty()) { - confirmMessage.add(MainApp.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes); - } - - final Double finalInsulinAfterConstraints = insulinAfterConstraints; - - final Context context = getContext(); - AlertDialog.Builder builder = new AlertDialog.Builder(context); - - builder.setTitle(MainApp.gs(R.string.confirmation)); - if (insulinAfterConstraints > 0 || pumpSiteChangeCheckbox.isChecked() || insulinCartridgeChangeCheckbox.isChecked()) { - builder.setMessage(Html.fromHtml(Joiner.on("
").join(confirmMessage))); - builder.setPositiveButton(MainApp.gs(R.string.primefill), (dialog, id) -> { - synchronized (builder) { - if (accepted) { - log.debug("guarding: already accepted"); - return; - } - accepted = true; - - if (finalInsulinAfterConstraints > 0) { - DetailedBolusInfo detailedBolusInfo = new DetailedBolusInfo(); - detailedBolusInfo.insulin = finalInsulinAfterConstraints; - detailedBolusInfo.context = context; - detailedBolusInfo.source = Source.USER; - detailedBolusInfo.isValid = false; // do not count it in IOB (for pump history) - detailedBolusInfo.notes = notes; - ConfigBuilderPlugin.getPlugin().getCommandQueue().bolus(detailedBolusInfo, new Callback() { - @Override - public void run() { - if (!result.success) { - Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class); - i.putExtra("soundid", R.raw.boluserror); - i.putExtra("status", result.comment); - i.putExtra("title", MainApp.gs(R.string.treatmentdeliveryerror)); - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - MainApp.instance().startActivity(i); - } - } - }); - } - if (pumpSiteChangeCheckbox.isChecked()) - NSUpload.uploadEvent(CareportalEvent.SITECHANGE, now(), notes); - if (insulinCartridgeChangeCheckbox.isChecked()) - NSUpload.uploadEvent(CareportalEvent.INSULINCHANGE, now() + 1000, notes); - } - }); - } else { - builder.setMessage(MainApp.gs(R.string.no_action_selected)); - } - builder.setNegativeButton(MainApp.gs(R.string.cancel), null); - builder.show(); - dismiss(); - } catch (RuntimeException e) { - log.error("Unhandled exception", e); - } - } - -} \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.kt new file mode 100644 index 0000000000..47c43cb377 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.kt @@ -0,0 +1,130 @@ +package info.nightscout.androidaps.plugins.general.actions.dialogs + +import android.content.Intent +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import com.google.common.base.Joiner +import info.nightscout.androidaps.MainApp +import info.nightscout.androidaps.R +import info.nightscout.androidaps.data.DetailedBolusInfo +import info.nightscout.androidaps.db.CareportalEvent +import info.nightscout.androidaps.db.Source +import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin +import info.nightscout.androidaps.plugins.general.nsclient.NSUpload +import info.nightscout.androidaps.plugins.general.overview.dialogs.DialogFragmentWithDate +import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity +import info.nightscout.androidaps.queue.Callback +import info.nightscout.androidaps.utils.* +import kotlinx.android.synthetic.main.actions_fill_dialog.* +import kotlinx.android.synthetic.main.notes.* +import kotlinx.android.synthetic.main.okcancel.* +import java.util.* +import kotlin.math.abs + +class FillDialog : DialogFragmentWithDate() { + + override fun onSaveInstanceState(savedInstanceState: Bundle) { + super.onSaveInstanceState(savedInstanceState) + savedInstanceState.putDouble("fill_insulinamount", fill_insulinamount.value) + } + + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle?): View? { + onCreateView() + return inflater.inflate(R.layout.actions_fill_dialog, container, false) + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + val maxInsulin = MainApp.getConstraintChecker().maxBolusAllowed.value() + val bolusStep = ConfigBuilderPlugin.getPlugin().activePump!!.pumpDescription.bolusStep + fill_insulinamount.setParams(savedInstanceState?.getDouble("fill_insulinamount") + ?: 0.0, 0.0, maxInsulin, bolusStep, DecimalFormatter.pumpSupportedBolusFormat(), true, ok) + val amount1 = SP.getDouble("fill_button1", 0.3) + if (amount1 > 0) { + fill_preset_button1.visibility = View.VISIBLE + fill_preset_button1.text = DecimalFormatter.toPumpSupportedBolus(amount1) // + "U"); + fill_preset_button1.setOnClickListener { fill_insulinamount.value = amount1 } + } else { + fill_preset_button1.visibility = View.GONE + } + val amount2 = SP.getDouble("fill_button2", 0.0) + if (amount2 > 0) { + fill_preset_button2.visibility = View.VISIBLE + fill_preset_button2.text = DecimalFormatter.toPumpSupportedBolus(amount2) // + "U"); + fill_preset_button2.setOnClickListener { fill_insulinamount.value = amount2 } + } else { + fill_preset_button2.visibility = View.GONE + } + val amount3 = SP.getDouble("fill_button3", 0.0) + if (amount3 > 0) { + fill_preset_button3.visibility = View.VISIBLE + fill_preset_button3.text = DecimalFormatter.toPumpSupportedBolus(amount3) // + "U"); + fill_preset_button3.setOnClickListener { fill_insulinamount.value = amount3 } + } else { + fill_preset_button3.visibility = View.GONE + } + + } + + override fun submit() { + val insulin = SafeParse.stringToDouble(fill_insulinamount.text) + val actions: LinkedList = LinkedList() + + val insulinAfterConstraints = MainApp.getConstraintChecker().applyBolusConstraints(Constraint(insulin)).value() + if (insulinAfterConstraints > 0) { + actions.add(MainApp.gs(R.string.fillwarning)) + actions.add("") + actions.add(MainApp.gs(R.string.bolus) + ": " + "" + DecimalFormatter.toPumpSupportedBolus(insulinAfterConstraints) + "U" + "") + if (abs(insulinAfterConstraints - insulin) > 0.01) + actions.add(MainApp.gs(R.string.bolusconstraintappliedwarning, MainApp.gc(R.color.warning), insulin, insulinAfterConstraints)) + } + val siteChange = fill_catheter_change.isChecked + if (siteChange) + actions.add("" + "" + MainApp.gs(R.string.record_pump_site_change) + "") + val insulinChange = fill_cartridge_change.isChecked + if (insulinChange) + actions.add("" + "" + MainApp.gs(R.string.record_insulin_cartridge_change) + "") + val notes = notes.text.toString() + if (notes.isNotEmpty()) + actions.add(MainApp.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes) + if (eventTimeChanged) + actions.add(MainApp.gs(R.string.time) + ": " + DateUtil.dateAndTimeString(eventTime)) + + if (insulinAfterConstraints > 0 || fill_catheter_change.isChecked || fill_cartridge_change.isChecked) { + activity?.let { activity -> + OKDialog.showConfirmation(activity, HtmlHelper.fromHtml(Joiner.on("
").join(actions))) { + if (insulinAfterConstraints > 0) { + val detailedBolusInfo = DetailedBolusInfo() + detailedBolusInfo.insulin = insulinAfterConstraints + detailedBolusInfo.context = context + detailedBolusInfo.source = Source.USER + detailedBolusInfo.isValid = false // do not count it in IOB (for pump history) + detailedBolusInfo.notes = notes + ConfigBuilderPlugin.getPlugin().commandQueue.bolus(detailedBolusInfo, object : Callback() { + override fun run() { + if (!result.success) { + val i = Intent(MainApp.instance(), ErrorHelperActivity::class.java) + i.putExtra("soundid", R.raw.boluserror) + i.putExtra("status", result.comment) + i.putExtra("title", MainApp.gs(R.string.treatmentdeliveryerror)) + i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + MainApp.instance().startActivity(i) + } + } + }) + } + if (siteChange) NSUpload.uploadEvent(CareportalEvent.SITECHANGE, eventTime, notes) + if (insulinChange) NSUpload.uploadEvent(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes) + } + } + } else { + OKDialog.show(activity, "", MainApp.gs(R.string.no_action_selected), null) + } + dismiss() + } +} \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/DialogFragmentWithDate.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/DialogFragmentWithDate.kt index eb36a6e3fd..ef50f0d035 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/DialogFragmentWithDate.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/DialogFragmentWithDate.kt @@ -4,10 +4,16 @@ import android.app.DatePickerDialog import android.app.TimePickerDialog import android.os.Bundle import android.text.format.DateFormat -import android.view.* +import android.view.View +import android.view.ViewGroup +import android.view.Window +import android.view.WindowManager import androidx.fragment.app.DialogFragment +import info.nightscout.androidaps.R import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.androidaps.utils.SP import kotlinx.android.synthetic.main.datetime.* +import kotlinx.android.synthetic.main.notes.* import kotlinx.android.synthetic.main.okcancel.* import org.slf4j.LoggerFactory import java.util.* @@ -97,6 +103,8 @@ abstract class DialogFragmentWithDate : DialogFragment() { } } + notes_layout?.visibility = if (SP.getBoolean(R.string.key_show_notes_entry_dialogs, false)) View.VISIBLE else View.GONE + ok.setOnClickListener { synchronized(okClicked) { if (okClicked) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ProfileSwitchDialog.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ProfileSwitchDialog.kt index e8c4083a39..56dc112527 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ProfileSwitchDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ProfileSwitchDialog.kt @@ -15,6 +15,7 @@ import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.OKDialog +import kotlinx.android.synthetic.main.notes.* import kotlinx.android.synthetic.main.okcancel.* import kotlinx.android.synthetic.main.overview_profileswitch_dialog.* import java.text.DecimalFormat @@ -87,7 +88,7 @@ class ProfileSwitchDialog : DialogFragmentWithDate() { val timeShift = overview_profileswitch_timeshift.value.toInt() if (timeShift != 0) actions.add(MainApp.gs(R.string.careportal_newnstreatment_timeshift_label) + ": " + MainApp.gs(R.string.format_hours, timeShift.toDouble())) - val notes = overview_profileswitch_notes.text.toString() + val notes = notes.text.toString() if (notes.isNotEmpty()) actions.add(MainApp.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes) if (eventTimeChanged) diff --git a/app/src/main/res/layout/actions_care_dialog.xml b/app/src/main/res/layout/actions_care_dialog.xml index 9fb33578a9..ccc2b15812 100644 --- a/app/src/main/res/layout/actions_care_dialog.xml +++ b/app/src/main/res/layout/actions_care_dialog.xml @@ -105,30 +105,7 @@ android:text="@string/careportal_newnstreatment_other" /> - - - - - - - + diff --git a/app/src/main/res/layout/actions_fill_dialog.xml b/app/src/main/res/layout/actions_fill_dialog.xml index ce52f25abb..55cfdc417f 100644 --- a/app/src/main/res/layout/actions_fill_dialog.xml +++ b/app/src/main/res/layout/actions_fill_dialog.xml @@ -1,56 +1,59 @@ + android:layout_width="match_parent" + android:layout_height="match_parent" + android:focusableInTouchMode="true" + android:minWidth="300dp" + android:orientation="vertical" + android:padding="10dp"> + android:orientation="vertical"> + android:orientation="horizontal" + android:padding="10dp"> + android:textAlignment="center" + android:textAppearance="?android:attr/textAppearanceLarge" /> @@ -58,22 +61,23 @@ + android:paddingTop="5dp" + android:paddingBottom="5dp"> + android:width="120dp" + android:text="@string/overview_insulin_label" + android:textStyle="bold" /> - + android:layout_height="wrap_content">