chore: wear rename editplusmin layouts

This commit is contained in:
Andries Smit 2022-06-28 10:06:05 +02:00
parent b30daaa2fe
commit f0076ed0dd
8 changed files with 24 additions and 24 deletions

View file

@ -4,13 +4,13 @@ import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import info.nightscout.androidaps.R import info.nightscout.androidaps.R
import info.nightscout.androidaps.databinding.ActionEditplusminusItemBinding import info.nightscout.androidaps.databinding.ActionEditplusminBinding
import info.nightscout.androidaps.databinding.ActionEditplusminusItemPlusBinding import info.nightscout.androidaps.databinding.ActionEditplusminMultiBinding
import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickleftyPlusBinding import info.nightscout.androidaps.databinding.ActionEditplusminQuickleftyMultiBinding
import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickleftyBinding import info.nightscout.androidaps.databinding.ActionEditplusminQuickleftyBinding
import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickrightyBinding import info.nightscout.androidaps.databinding.ActionEditplusminQuickrightyBinding
import info.nightscout.androidaps.databinding.ActionEditplusminusItemQuickrightyPlusBinding import info.nightscout.androidaps.databinding.ActionEditplusminQuickrightyMultiBinding
import info.nightscout.androidaps.databinding.ActionEditplusminusItemViktoriaBinding import info.nightscout.androidaps.databinding.ActionEditplusminViktoriaBinding
import info.nightscout.shared.sharedPreferences.SP 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. * Requires at least one of the ViewBinding as a parameter. Recommended to use the factory object to create the binding.
*/ */
class EditPlusMinusViewAdapter( class EditPlusMinusViewAdapter(
eD: ActionEditplusminusItemBinding?, eD: ActionEditplusminBinding?,
eDP: ActionEditplusminusItemPlusBinding?, eDP: ActionEditplusminMultiBinding?,
eQL: ActionEditplusminusItemQuickleftyBinding?, eQL: ActionEditplusminQuickleftyBinding?,
eQLP: ActionEditplusminusItemQuickleftyPlusBinding?, eQLP: ActionEditplusminQuickleftyMultiBinding?,
eQR: ActionEditplusminusItemQuickrightyBinding?, eQR: ActionEditplusminQuickrightyBinding?,
eQRP: ActionEditplusminusItemQuickrightyPlusBinding?, eQRP: ActionEditplusminQuickrightyMultiBinding?,
eV: ActionEditplusminusItemViktoriaBinding? eV: ActionEditplusminViktoriaBinding?
) { ) {
init { init {
@ -59,35 +59,35 @@ class EditPlusMinusViewAdapter(
return when (sp.getInt(R.string.key_input_design, 1)) { return when (sp.getInt(R.string.key_input_design, 1)) {
2 -> { 2 -> {
if (multiple) { if (multiple) {
val bindLayout = ActionEditplusminusItemQuickrightyPlusBinding.inflate(inflater, container, false) val bindLayout = ActionEditplusminQuickrightyMultiBinding.inflate(inflater, container, false)
EditPlusMinusViewAdapter(null, null, null, null, null, bindLayout, null) EditPlusMinusViewAdapter(null, null, null, null, null, bindLayout, null)
} else { } else {
val bindLayout = ActionEditplusminusItemQuickrightyBinding.inflate(inflater, container, false) val bindLayout = ActionEditplusminQuickrightyBinding.inflate(inflater, container, false)
EditPlusMinusViewAdapter(null, null, null, null, bindLayout, null, null) EditPlusMinusViewAdapter(null, null, null, null, bindLayout, null, null)
} }
} }
3 -> { 3 -> {
if (multiple) { if (multiple) {
val bindLayout = ActionEditplusminusItemQuickleftyPlusBinding.inflate(inflater, container, false) val bindLayout = ActionEditplusminQuickleftyMultiBinding.inflate(inflater, container, false)
EditPlusMinusViewAdapter(null, null, null, bindLayout, null, null, null) EditPlusMinusViewAdapter(null, null, null, bindLayout, null, null, null)
} else { } else {
val bindLayout = ActionEditplusminusItemQuickleftyBinding.inflate(inflater, container, false) val bindLayout = ActionEditplusminQuickleftyBinding.inflate(inflater, container, false)
EditPlusMinusViewAdapter(null, null, bindLayout, null, null, null, null) EditPlusMinusViewAdapter(null, null, bindLayout, null, null, null, null)
} }
} }
4 -> { 4 -> {
val bindLayout = ActionEditplusminusItemViktoriaBinding.inflate(inflater, container, false) val bindLayout = ActionEditplusminViktoriaBinding.inflate(inflater, container, false)
EditPlusMinusViewAdapter(null, null, null, null, null, null, bindLayout) EditPlusMinusViewAdapter(null, null, null, null, null, null, bindLayout)
} }
else -> { else -> {
if (multiple) { if (multiple) {
val bindLayout = ActionEditplusminusItemPlusBinding.inflate(inflater, container, false) val bindLayout = ActionEditplusminMultiBinding.inflate(inflater, container, false)
EditPlusMinusViewAdapter(null, bindLayout, null, null, null, null, null) EditPlusMinusViewAdapter(null, bindLayout, null, null, null, null, null)
} else { } else {
val bindLayout = ActionEditplusminusItemBinding.inflate(inflater, container, false) val bindLayout = ActionEditplusminBinding.inflate(inflater, container, false)
EditPlusMinusViewAdapter(bindLayout, null, null, null, null, null, null) EditPlusMinusViewAdapter(bindLayout, null, null, null, null, null, null)
} }
} }

View file

@ -35,7 +35,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/edit_text" android:layout_below="@+id/edit_text"
android:layout_marginTop="-8dp" android:layout_marginTop="-9dp"
android:gravity="center" android:gravity="center"
android:labelFor="@+id/edit_text" android:labelFor="@+id/edit_text"
android:textColor="@color/white" android:textColor="@color/white"
@ -44,7 +44,7 @@
app:layout_constraintStart_toStartOf="@+id/edit_text" app:layout_constraintStart_toStartOf="@+id/edit_text"
app:layout_constraintTop_toBottomOf="@id/edit_text" app:layout_constraintTop_toBottomOf="@id/edit_text"
tools:ignore="LabelFor" tools:ignore="LabelFor"
tools:text="label" /> tools:text="label123" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/min_button" android:id="@+id/min_button"

View file

@ -35,7 +35,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/edit_text" android:layout_below="@+id/edit_text"
android:layout_marginTop="-8dp" android:layout_marginTop="-9dp"
android:gravity="center" android:gravity="center"
android:labelFor="@+id/edit_text" android:labelFor="@+id/edit_text"
android:textColor="@color/white" android:textColor="@color/white"