Updated on 2026-08-14
This commit is contained in:
parent
deee3fde59
commit
83f376b139
2 changed files with 10 additions and 7 deletions
|
|
@ -14,6 +14,7 @@ import com.tangem.tangemtest.R
|
|||
import com.tangem.tangemtest._arch.structure.Id
|
||||
import com.tangem.tangemtest._arch.structure.abstraction.BaseItem
|
||||
import com.tangem.tangemtest._arch.structure.abstraction.Item
|
||||
import com.tangem.tangemtest.ucase.resources.ActionType
|
||||
import com.tangem.tangemtest.ucase.resources.MainResourceHolder
|
||||
import com.tangem.tangemtest.ucase.resources.Resources
|
||||
import ru.dev.gbixahue.eu4d.lib.android.global.log.Log
|
||||
|
|
@ -53,7 +54,7 @@ class ParameterWidget(
|
|||
etValue.setText(stringOf(dataItem.viewModel.data))
|
||||
etValue.addTextChangedListener(valueWatcher)
|
||||
btnAction.setOnClickListener { onActionBtnClickListener?.invoke() }
|
||||
btnAction.setText(getResNameId())
|
||||
btnAction.setText(getResNameId(ActionType.Scan))
|
||||
toggleActionBtnVisibility()
|
||||
initDescriptionWidget()
|
||||
}
|
||||
|
|
@ -112,6 +113,6 @@ class ParameterWidget(
|
|||
}
|
||||
}
|
||||
|
||||
fun ParameterWidget.getResNameId(): Int = MainResourceHolder.safeGet<Resources>(id).resName
|
||||
fun ParameterWidget.getResNameId(id: Id? = null): Int = MainResourceHolder.safeGet<Resources>(id?: this.id).resName
|
||||
|
||||
fun ParameterWidget.getResDescription(): Int? = MainResourceHolder.safeGet<Resources>(id).resDescription
|
||||
|
|
@ -9,16 +9,16 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/def_indent"
|
||||
android:paddingEnd="@dimen/def_indent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_param"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.Dense"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/def_indent"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="@dimen/def_indent"
|
||||
android:layout_weight="1"
|
||||
app:boxBackgroundColor="@android:color/transparent"
|
||||
app:endIconMode="clear_text">
|
||||
|
|
@ -28,7 +28,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start|bottom"
|
||||
android:paddingBottom="4dp" />
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="@dimen/def_double_indent"
|
||||
android:paddingBottom="4dp"
|
||||
android:textSize="@dimen/unit_widget_text_size" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
|
@ -37,7 +40,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/def_indent"
|
||||
android:visibility="gone"
|
||||
tools:text="Action"
|
||||
tools:visibility="visible" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue