Merge remote-tracking branch 'origin/dev_260316_新设备' into dev_260316_新设备
This commit is contained in:
@@ -43,7 +43,7 @@ class ScaleRowAdapter : BaseQuickAdapter<ScaleRowAdapter.ScaleItem, ScaleRowAdap
|
|||||||
holder.b.tvState.text = when (item.state) {
|
holder.b.tvState.text = when (item.state) {
|
||||||
WeightUtil.STATE_STABLE -> "稳定"
|
WeightUtil.STATE_STABLE -> "稳定"
|
||||||
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
||||||
WeightUtil.STATE_OVER_WEIGHT -> "超量"
|
WeightUtil.STATE_OVER_WEIGHT -> "量程溢出"
|
||||||
else -> "${item.state}"
|
else -> "${item.state}"
|
||||||
}
|
}
|
||||||
// 点击时通过 bindingAdapterPosition 取最新数据,避免闭包捕获过期 item
|
// 点击时通过 bindingAdapterPosition 取最新数据,避免闭包捕获过期 item
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class Seasoning18GridAdapter(
|
|||||||
private fun stateStr(state: Int) = when (state) {
|
private fun stateStr(state: Int) = when (state) {
|
||||||
WeightUtil.STATE_STABLE -> "稳定"
|
WeightUtil.STATE_STABLE -> "稳定"
|
||||||
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
||||||
WeightUtil.STATE_OVER_WEIGHT -> "超量"
|
WeightUtil.STATE_OVER_WEIGHT -> "量程溢出"
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class Seasoning22GridAdapter(
|
|||||||
private fun stateStr(state: Int) = when (state) {
|
private fun stateStr(state: Int) = when (state) {
|
||||||
WeightUtil.STATE_STABLE -> "稳定"
|
WeightUtil.STATE_STABLE -> "稳定"
|
||||||
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
||||||
WeightUtil.STATE_OVER_WEIGHT -> "超量"
|
WeightUtil.STATE_OVER_WEIGHT -> "量程溢出"
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ class MasterScaleActivity : BaseActivity() {
|
|||||||
private fun stateStr(state: Int?) = when (state) {
|
private fun stateStr(state: Int?) = when (state) {
|
||||||
WeightUtil.STATE_STABLE -> "稳定"
|
WeightUtil.STATE_STABLE -> "稳定"
|
||||||
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
WeightUtil.STATE_UNSTABLE -> "不稳定"
|
||||||
WeightUtil.STATE_OVER_WEIGHT -> "超量"
|
WeightUtil.STATE_OVER_WEIGHT -> "量程溢出"
|
||||||
null -> ""
|
null -> ""
|
||||||
else -> "$state"
|
else -> "$state"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user