From f0076ed0dd1fa3ce0c3242ebbc6be8b75be49d11 Mon Sep 17 00:00:00 2001 From: Andries Smit Date: Tue, 28 Jun 2022 10:06:05 +0200 Subject: [PATCH] chore: wear rename editplusmin layouts --- .../utils/EditPlusMinusViewAdapter.kt | 42 +++++++++---------- ...sminus_item.xml => action_editplusmin.xml} | 0 ..._plus.xml => action_editplusmin_multi.xml} | 0 ....xml => action_editplusmin_quicklefty.xml} | 0 ...> action_editplusmin_quicklefty_multi.xml} | 4 +- ...xml => action_editplusmin_quickrighty.xml} | 0 ... action_editplusmin_quickrighty_multi.xml} | 2 +- ...ia.xml => action_editplusmin_viktoria.xml} | 0 8 files changed, 24 insertions(+), 24 deletions(-) rename wear/src/main/res/layout/{action_editplusminus_item.xml => action_editplusmin.xml} (100%) rename wear/src/main/res/layout/{action_editplusminus_item_plus.xml => action_editplusmin_multi.xml} (100%) rename wear/src/main/res/layout/{action_editplusminus_item_quicklefty.xml => action_editplusmin_quicklefty.xml} (100%) rename wear/src/main/res/layout/{action_editplusminus_item_quicklefty_plus.xml => action_editplusmin_quicklefty_multi.xml} (98%) rename wear/src/main/res/layout/{action_editplusminus_item_quickrighty.xml => action_editplusmin_quickrighty.xml} (100%) rename wear/src/main/res/layout/{action_editplusminus_item_quickrighty_plus.xml => action_editplusmin_quickrighty_multi.xml} (99%) rename wear/src/main/res/layout/{action_editplusminus_item_viktoria.xml => action_editplusmin_viktoria.xml} (100%) diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/EditPlusMinusViewAdapter.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/EditPlusMinusViewAdapter.kt index 81c343db74..df13d69b8a 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/EditPlusMinusViewAdapter.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/EditPlusMinusViewAdapter.kt @@ -4,13 +4,13 @@ import android.content.Context import android.view.LayoutInflater import android.view.ViewGroup import info.nightscout.androidaps.R -import info.nightscout.androidaps.databinding.ActionEditplusminusItemBinding -import info.nightscout.androidaps.databinding.ActionEditplusminusItemPlusBinding -import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickleftyPlusBinding -import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickleftyBinding -import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickrightyBinding -import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickrightyPlusBinding -import info.nightscout.androidaps.databinding.ActionEditplusminusItemViktoriaBinding +import info.nightscout.androidaps.databinding.ActionEditplusminBinding +import info.nightscout.androidaps.databinding.ActionEditplusminMultiBinding +import info.nightscout.androidaps.databinding.ActionEditplusminQuickleftyMultiBinding +import info.nightscout.androidaps.databinding.ActionEditplusminQuickleftyBinding +import info.nightscout.androidaps.databinding.ActionEditplusminQuickrightyBinding +import info.nightscout.androidaps.databinding.ActionEditplusminQuickrightyMultiBinding +import info.nightscout.androidaps.databinding.ActionEditplusminViktoriaBinding import info.nightscout.shared.sharedPreferences.SP /** @@ -18,13 +18,13 @@ import info.nightscout.shared.sharedPreferences.SP * Requires at least one of the ViewBinding as a parameter. Recommended to use the factory object to create the binding. */ class EditPlusMinusViewAdapter( - eD: ActionEditplusminusItemBinding?, - eDP: ActionEditplusminusItemPlusBinding?, - eQL: ActionEditplusminusItemQuickleftyBinding?, - eQLP: ActionEditplusminusItemQuickleftyPlusBinding?, - eQR: ActionEditplusminusItemQuickrightyBinding?, - eQRP: ActionEditplusminusItemQuickrightyPlusBinding?, - eV: ActionEditplusminusItemViktoriaBinding? + eD: ActionEditplusminBinding?, + eDP: ActionEditplusminMultiBinding?, + eQL: ActionEditplusminQuickleftyBinding?, + eQLP: ActionEditplusminQuickleftyMultiBinding?, + eQR: ActionEditplusminQuickrightyBinding?, + eQRP: ActionEditplusminQuickrightyMultiBinding?, + eV: ActionEditplusminViktoriaBinding? ) { init { @@ -59,35 +59,35 @@ class EditPlusMinusViewAdapter( return when (sp.getInt(R.string.key_input_design, 1)) { 2 -> { if (multiple) { - val bindLayout = ActionEditplusminusItemQuickrightyPlusBinding.inflate(inflater, container, false) + val bindLayout = ActionEditplusminQuickrightyMultiBinding.inflate(inflater, container, false) EditPlusMinusViewAdapter(null, null, null, null, null, bindLayout, null) } else { - val bindLayout = ActionEditplusminusItemQuickrightyBinding.inflate(inflater, container, false) + val bindLayout = ActionEditplusminQuickrightyBinding.inflate(inflater, container, false) EditPlusMinusViewAdapter(null, null, null, null, bindLayout, null, null) } } 3 -> { if (multiple) { - val bindLayout = ActionEditplusminusItemQuickleftyPlusBinding.inflate(inflater, container, false) + val bindLayout = ActionEditplusminQuickleftyMultiBinding.inflate(inflater, container, false) EditPlusMinusViewAdapter(null, null, null, bindLayout, null, null, null) } else { - val bindLayout = ActionEditplusminusItemQuickleftyBinding.inflate(inflater, container, false) + val bindLayout = ActionEditplusminQuickleftyBinding.inflate(inflater, container, false) EditPlusMinusViewAdapter(null, null, bindLayout, null, null, null, null) } } 4 -> { - val bindLayout = ActionEditplusminusItemViktoriaBinding.inflate(inflater, container, false) + val bindLayout = ActionEditplusminViktoriaBinding.inflate(inflater, container, false) EditPlusMinusViewAdapter(null, null, null, null, null, null, bindLayout) } else -> { if (multiple) { - val bindLayout = ActionEditplusminusItemPlusBinding.inflate(inflater, container, false) + val bindLayout = ActionEditplusminMultiBinding.inflate(inflater, container, false) EditPlusMinusViewAdapter(null, bindLayout, null, null, null, null, null) } else { - val bindLayout = ActionEditplusminusItemBinding.inflate(inflater, container, false) + val bindLayout = ActionEditplusminBinding.inflate(inflater, container, false) EditPlusMinusViewAdapter(bindLayout, null, null, null, null, null, null) } } diff --git a/wear/src/main/res/layout/action_editplusminus_item.xml b/wear/src/main/res/layout/action_editplusmin.xml similarity index 100% rename from wear/src/main/res/layout/action_editplusminus_item.xml rename to wear/src/main/res/layout/action_editplusmin.xml diff --git a/wear/src/main/res/layout/action_editplusminus_item_plus.xml b/wear/src/main/res/layout/action_editplusmin_multi.xml similarity index 100% rename from wear/src/main/res/layout/action_editplusminus_item_plus.xml rename to wear/src/main/res/layout/action_editplusmin_multi.xml diff --git a/wear/src/main/res/layout/action_editplusminus_item_quicklefty.xml b/wear/src/main/res/layout/action_editplusmin_quicklefty.xml similarity index 100% rename from wear/src/main/res/layout/action_editplusminus_item_quicklefty.xml rename to wear/src/main/res/layout/action_editplusmin_quicklefty.xml diff --git a/wear/src/main/res/layout/action_editplusminus_item_quicklefty_plus.xml b/wear/src/main/res/layout/action_editplusmin_quicklefty_multi.xml similarity index 98% rename from wear/src/main/res/layout/action_editplusminus_item_quicklefty_plus.xml rename to wear/src/main/res/layout/action_editplusmin_quicklefty_multi.xml index 121be927ac..5a4e9b10cb 100644 --- a/wear/src/main/res/layout/action_editplusminus_item_quicklefty_plus.xml +++ b/wear/src/main/res/layout/action_editplusmin_quicklefty_multi.xml @@ -35,7 +35,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/edit_text" - android:layout_marginTop="-8dp" + android:layout_marginTop="-9dp" android:gravity="center" android:labelFor="@+id/edit_text" android:textColor="@color/white" @@ -44,7 +44,7 @@ app:layout_constraintStart_toStartOf="@+id/edit_text" app:layout_constraintTop_toBottomOf="@id/edit_text" tools:ignore="LabelFor" - tools:text="label" /> + tools:text="label123" />