optimize overview buttons layout

This commit is contained in:
osodebailar 2022-04-22 11:04:17 +02:00
parent 06a07724fb
commit 813fa8a787

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/overview_buttons" android:id="@+id/overview_buttons"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -45,9 +45,11 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/icon_insulin_carbs" android:drawableTop="@drawable/icon_insulin_carbs"
android:text="@string/overview_treatment_label" android:text="@string/overview_treatment_label"
android:singleLine="true"
android:ellipsize="end"
app:iconPadding="-4dp"
android:textColor="?attr/icTreatmentColor" android:textColor="?attr/icTreatmentColor"
android:visibility="gone" android:visibility="gone" />
tools:ignore="SmallSp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton <info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/insulin_button" android:id="@+id/insulin_button"
@ -58,8 +60,10 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_bolus" android:drawableTop="@drawable/ic_bolus"
android:text="@string/overview_insulin_label" android:text="@string/overview_insulin_label"
android:textColor="?attr/icBolusColor" android:singleLine="true"
tools:ignore="SmallSp" /> android:ellipsize="end"
app:iconPadding="-4dp"
android:textColor="?attr/icBolusColor" />
<info.nightscout.androidaps.utils.ui.SingleClickButton <info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/carbs_button" android:id="@+id/carbs_button"
@ -70,8 +74,10 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_cp_bolus_carbs" android:drawableTop="@drawable/ic_cp_bolus_carbs"
android:text="@string/treatments_wizard_carbs_label" android:text="@string/treatments_wizard_carbs_label"
android:textColor="?attr/icBolusCarbsColor" android:singleLine="true"
tools:ignore="SmallSp" /> android:ellipsize="end"
app:iconPadding="-4dp"
android:textColor="?attr/icBolusCarbsColor" />
<info.nightscout.androidaps.utils.ui.SingleClickButton <info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/wizard_button" android:id="@+id/wizard_button"
@ -82,8 +88,10 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_calculator" android:drawableTop="@drawable/ic_calculator"
android:text="@string/overview_calculator_label" android:text="@string/overview_calculator_label"
android:textColor="?attr/icCalculatorColor" android:singleLine="true"
tools:ignore="SmallSp" /> android:ellipsize="end"
app:iconPadding="-4dp"
android:textColor="?attr/icCalculatorColor"/>
<info.nightscout.androidaps.utils.ui.SingleClickButton <info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/calibration_button" android:id="@+id/calibration_button"
@ -94,9 +102,11 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_calibration" android:drawableTop="@drawable/ic_calibration"
android:text="@string/overview_calibration" android:text="@string/overview_calibration"
android:singleLine="true"
android:ellipsize="end"
app:iconPadding="-4dp"
android:textColor="?attr/icCalibrationColor" android:textColor="?attr/icCalibrationColor"
android:visibility="gone" android:visibility="gone" />
tools:ignore="SmallSp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton <info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/cgm_button" android:id="@+id/cgm_button"
@ -107,9 +117,11 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_xdrip" android:drawableTop="@drawable/ic_xdrip"
android:text="@string/overview_cgm" android:text="@string/overview_cgm"
android:singleLine="true"
android:ellipsize="end"
app:iconPadding="-4dp"
android:textColor="?attr/icCalibrationColor" android:textColor="?attr/icCalibrationColor"
android:visibility="gone" android:visibility="gone" />
tools:ignore="SmallSp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton <info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/quick_wizard_button" android:id="@+id/quick_wizard_button"
@ -121,8 +133,8 @@
android:drawableTop="@drawable/ic_quick_wizard" android:drawableTop="@drawable/ic_quick_wizard"
android:text="@string/quickwizard" android:text="@string/quickwizard"
android:hint="@string/quickwizard" android:hint="@string/quickwizard"
android:textColor="?attr/icQuickWizardColor" app:iconPadding="-4dp"
tools:ignore="SmallSp" /> android:textColor="?attr/icQuickWizardColor" />
</LinearLayout> </LinearLayout>