style: 国际出港/进港列表状态字段按值变色(01绿/W蓝)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -108,7 +108,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.declareStatus}"
|
android:text="@{bean.declareStatus}"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/text_blue : @color/text_normal)}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.loadStatus}"
|
android:text="@{bean.loadStatus}"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@{`01`.equals(bean.loadStatus) ? @color/text_green : (`W`.equals(bean.loadStatus) ? @color/text_blue : @color/text_normal)}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<!-- 状态 (weight=1) -->
|
<!-- 状态 (weight=1) -->
|
||||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
||||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="状态:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="状态:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.declareStatus}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.declareStatus}" android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/text_blue : @color/text_normal)}" android:textSize="15sp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!-- 代理 (weight=1) -->
|
<!-- 代理 (weight=1) -->
|
||||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
||||||
|
|||||||
@@ -107,7 +107,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:text="@{manifest.mftStatus ?? ``}" />
|
android:text="@{manifest.mftStatus ?? ``}"
|
||||||
|
android:textColor="@{`01`.equals(manifest.mftStatus) ? @color/text_green : (`W`.equals(manifest.mftStatus) ? @color/text_blue : @color/text_normal)}" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:text="@{bean.status}" />
|
android:text="@{bean.status}"
|
||||||
|
android:textColor="@{`01`.equals(bean.status) ? @color/text_green : (`W`.equals(bean.status) ? @color/text_blue : @color/text_normal)}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user