feat: 出港组装 开始组装 status color
This commit is contained in:
@@ -125,6 +125,15 @@ class PadDataLayoutNew : FrameLayout {
|
|||||||
et.inputType = value
|
et.inputType = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var valueTextColor: Int = 0
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
if (value != 0) {
|
||||||
|
tv.setTextColor(value)
|
||||||
|
et.setTextColor(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新事件回调
|
* 刷新事件回调
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -276,6 +276,7 @@
|
|||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value="@={viewModel.uldInfo.uldStatus}"
|
value="@={viewModel.uldInfo.uldStatus}"
|
||||||
|
valueTextColor="@{viewModel.uldInfo.uldStatus.equals(`正常`) ? @color/text_green : (viewModel.uldInfo.uldStatus.equals(`故障`) ? @color/red : @color/text_normal)}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|||||||
Reference in New Issue
Block a user