diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_remind_equipment_rv_l.xml b/app/src/main/res/layout/item_remind_equipment_rv_l.xml index f063784..0841740 100644 --- a/app/src/main/res/layout/item_remind_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_remind_equipment_rv_l.xml @@ -11,11 +11,19 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + @@ -24,19 +32,10 @@ android:id="@+id/modelView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" - android:layout_marginStart="@dimen/dp_5" android:text="型号A" android:textColor="@color/themeColor" app:qmui_borderColor="@color/themeColor" /> - - + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_remind_equipment_rv_l.xml b/app/src/main/res/layout/item_remind_equipment_rv_l.xml index f063784..0841740 100644 --- a/app/src/main/res/layout/item_remind_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_remind_equipment_rv_l.xml @@ -11,11 +11,19 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + @@ -24,19 +32,10 @@ android:id="@+id/modelView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" - android:layout_marginStart="@dimen/dp_5" android:text="型号A" android:textColor="@color/themeColor" app:qmui_borderColor="@color/themeColor" /> - - + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_select_customer_lv.xml b/app/src/main/res/layout/item_select_customer_lv.xml index 9d9c0d9..e100203 100644 --- a/app/src/main/res/layout/item_select_customer_lv.xml +++ b/app/src/main/res/layout/item_select_customer_lv.xml @@ -6,39 +6,39 @@ android:orientation="horizontal" android:padding="@dimen/dp_15"> + + - - - - @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_remind_equipment_rv_l.xml b/app/src/main/res/layout/item_remind_equipment_rv_l.xml index f063784..0841740 100644 --- a/app/src/main/res/layout/item_remind_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_remind_equipment_rv_l.xml @@ -11,11 +11,19 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + @@ -24,19 +32,10 @@ android:id="@+id/modelView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" - android:layout_marginStart="@dimen/dp_5" android:text="型号A" android:textColor="@color/themeColor" app:qmui_borderColor="@color/themeColor" /> - - + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_select_customer_lv.xml b/app/src/main/res/layout/item_select_customer_lv.xml index 9d9c0d9..e100203 100644 --- a/app/src/main/res/layout/item_select_customer_lv.xml +++ b/app/src/main/res/layout/item_select_customer_lv.xml @@ -6,39 +6,39 @@ android:orientation="horizontal" android:padding="@dimen/dp_15"> + + - - - - + + - - + android:textSize="@dimen/sp_16" /> @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_remind_equipment_rv_l.xml b/app/src/main/res/layout/item_remind_equipment_rv_l.xml index f063784..0841740 100644 --- a/app/src/main/res/layout/item_remind_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_remind_equipment_rv_l.xml @@ -11,11 +11,19 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + @@ -24,19 +32,10 @@ android:id="@+id/modelView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" - android:layout_marginStart="@dimen/dp_5" android:text="型号A" android:textColor="@color/themeColor" app:qmui_borderColor="@color/themeColor" /> - - + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_select_customer_lv.xml b/app/src/main/res/layout/item_select_customer_lv.xml index 9d9c0d9..e100203 100644 --- a/app/src/main/res/layout/item_select_customer_lv.xml +++ b/app/src/main/res/layout/item_select_customer_lv.xml @@ -6,39 +6,39 @@ android:orientation="horizontal" android:padding="@dimen/dp_15"> + + - - - - + + - - + android:textSize="@dimen/sp_16" /> + + - - @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_remind_equipment_rv_l.xml b/app/src/main/res/layout/item_remind_equipment_rv_l.xml index f063784..0841740 100644 --- a/app/src/main/res/layout/item_remind_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_remind_equipment_rv_l.xml @@ -11,11 +11,19 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + @@ -24,19 +32,10 @@ android:id="@+id/modelView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" - android:layout_marginStart="@dimen/dp_5" android:text="型号A" android:textColor="@color/themeColor" app:qmui_borderColor="@color/themeColor" /> - - + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_select_customer_lv.xml b/app/src/main/res/layout/item_select_customer_lv.xml index 9d9c0d9..e100203 100644 --- a/app/src/main/res/layout/item_select_customer_lv.xml +++ b/app/src/main/res/layout/item_select_customer_lv.xml @@ -6,39 +6,39 @@ android:orientation="horizontal" android:padding="@dimen/dp_15"> + + - - - - + + - - + android:textSize="@dimen/sp_16" /> + + - - - - - \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_remind_equipment_rv_l.xml b/app/src/main/res/layout/item_remind_equipment_rv_l.xml index f063784..0841740 100644 --- a/app/src/main/res/layout/item_remind_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_remind_equipment_rv_l.xml @@ -11,11 +11,19 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + @@ -24,19 +32,10 @@ android:id="@+id/modelView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" - android:layout_marginStart="@dimen/dp_5" android:text="型号A" android:textColor="@color/themeColor" app:qmui_borderColor="@color/themeColor" /> - - + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_select_customer_lv.xml b/app/src/main/res/layout/item_select_customer_lv.xml index 9d9c0d9..e100203 100644 --- a/app/src/main/res/layout/item_select_customer_lv.xml +++ b/app/src/main/res/layout/item_select_customer_lv.xml @@ -6,39 +6,39 @@ android:orientation="horizontal" android:padding="@dimen/dp_15"> + + - - - - + + - - + android:textSize="@dimen/sp_16" /> + + - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d85ef32..254721a 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -15,4 +15,13 @@ #FFF5F5F5 #80F5F5F5 #D8D8D8 + + #E4ECFF + #60A5FF + #DCF7FE + #3CCCE3 + #D8F7F1 + #3CCCE3 + #FDF7E9 + #F9C477 \ No newline at end of file diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt index 7391b67..26190af 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/CustomerActivity.kt @@ -1,5 +1,6 @@ package com.casic.xz.meterage.view.home +import android.content.Context import android.os.Handler import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.DividerItemDecoration @@ -15,6 +16,7 @@ import com.gyf.immersionbar.ImmersionBar import com.pengxh.kt.lite.adapter.NormalRecyclerAdapter import com.pengxh.kt.lite.adapter.ViewHolder +import com.pengxh.kt.lite.extensions.convertColor import com.pengxh.kt.lite.extensions.navigatePageTo import com.pengxh.kt.lite.extensions.show import com.pengxh.kt.lite.utils.WeakReferenceHandler @@ -26,6 +28,7 @@ class CustomerActivity : ApplicationBaseActivity() { + private val context: Context = this@CustomerActivity private lateinit var weakReferenceHandler: WeakReferenceHandler private lateinit var customerViewModel: CustomerViewModel private lateinit var customerAdapter: NormalRecyclerAdapter @@ -139,6 +142,28 @@ position: Int, item: CustomerListModel.DataModel.RowsModel ) { +// "0" -> "A" +// "1" -> "B" +// "2" -> "C" +// "3" -> "D" + val color = when (item.grade) { + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) + } + viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) diff --git a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt index c5eaaf2..dabbc07 100644 --- a/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt +++ b/app/src/main/java/com/casic/xz/meterage/view/home/SelectCustomerActivity.kt @@ -153,17 +153,26 @@ item: CustomerListModel.DataModel.RowsModel ) { val color = when (item.grade) { - "0" -> R.color.green.convertColor(context) - "1" -> R.color.blue.convertColor(context) - "2" -> R.color.gray.convertColor(context) - else -> R.color.red.convertColor(context) + "0" -> R.color.color_A.convertColor(context) + "1" -> R.color.color_B.convertColor(context) + "2" -> R.color.color_C.convertColor(context) + "3" -> R.color.color_D.convertColor(context) + else -> R.color.mainBackground.convertColor(context) } viewHolder.setBackgroundColor(R.id.agreementLevelView, color) + val textColor = when (item.grade) { + "0" -> R.color.textColor_A.convertColor(context) + "1" -> R.color.textColor_B.convertColor(context) + "2" -> R.color.textColor_C.convertColor(context) + "3" -> R.color.textColor_D.convertColor(context) + else -> R.color.gray.convertColor(context) + } + viewHolder.setTextColor(R.id.agreementLevelView, textColor) + viewHolder.setText( R.id.agreementLevelView, item.grade.toChineseGrade() ).setText(R.id.customerNameView, item.customerName) - .setText(R.id.scaleView, item.companySizeName) .setText(R.id.overallView, "公司规模:${item.evaluationName}") .setText(R.id.fullAddressView, "公司地址:${item.fullAddress}") } diff --git a/app/src/main/res/drawable/ic_clock.xml b/app/src/main/res/drawable/ic_clock.xml index 5c69239..d21a562 100644 --- a/app/src/main/res/drawable/ic_clock.xml +++ b/app/src/main/res/drawable/ic_clock.xml @@ -4,9 +4,9 @@ android:viewportWidth="1024" android:viewportHeight="1024"> diff --git a/app/src/main/res/layout/item_capability_rv_l.xml b/app/src/main/res/layout/item_capability_rv_l.xml index ed5b810..b25a953 100644 --- a/app/src/main/res/layout/item_capability_rv_l.xml +++ b/app/src/main/res/layout/item_capability_rv_l.xml @@ -18,7 +18,7 @@ android:layout_height="wrap_content" android:text="继电器保护" android:textColor="@color/black" - android:textSize="@dimen/sp_14" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:textSize="@dimen/sp_16" /> + android:paddingHorizontal="@dimen/dp_7" + android:paddingVertical="@dimen/dp_5"> + + - - + android:textSize="@dimen/sp_16" /> - - - - + + app:qmui_backgroundColor="@color/themeColor" + app:qmui_radiusTopLeft="@dimen/dp_5" /> - - + + + android:textColor="@color/gray" + android:textSize="@dimen/sp_12" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_bs_rv_l.xml b/app/src/main/res/layout/item_entrust_bs_rv_l.xml index e956521..c627efd 100644 --- a/app/src/main/res/layout/item_entrust_bs_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_bs_rv_l.xml @@ -10,36 +10,38 @@ android:paddingTop="@dimen/dp_10" android:paddingBottom="@dimen/dp_5"> - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_entrust_rv_l.xml b/app/src/main/res/layout/item_entrust_rv_l.xml index e5c45e2..2e5e3da 100644 --- a/app/src/main/res/layout/item_entrust_rv_l.xml +++ b/app/src/main/res/layout/item_entrust_rv_l.xml @@ -16,34 +16,20 @@ android:orientation="horizontal" android:paddingHorizontal="@dimen/dp_7"> + + - - - - + android:textSize="@dimen/sp_12" /> - + android:layout_marginTop="@dimen/dp_3"> - + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_equipment_rv_l.xml b/app/src/main/res/layout/item_equipment_rv_l.xml index 83caa72..3eddc6f 100644 --- a/app/src/main/res/layout/item_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_equipment_rv_l.xml @@ -11,31 +11,30 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + android:textSize="@dimen/sp_16" /> - - + + - - + android:textSize="@dimen/sp_16" /> - - + android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/dp_5"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_meterage_train_rv_l.xml b/app/src/main/res/layout/item_meterage_train_rv_l.xml index d27e309..67b176f 100644 --- a/app/src/main/res/layout/item_meterage_train_rv_l.xml +++ b/app/src/main/res/layout/item_meterage_train_rv_l.xml @@ -97,7 +97,7 @@ android:layout_marginStart="@dimen/dp_5" android:singleLine="true" android:text="2023-02-09 10:00:00" - android:textColor="@color/black" + android:textColor="@color/gray" android:textSize="@dimen/sp_14" /> diff --git a/app/src/main/res/layout/item_outfield_detection_rv_l.xml b/app/src/main/res/layout/item_outfield_detection_rv_l.xml index 4f9c691..153c514 100644 --- a/app/src/main/res/layout/item_outfield_detection_rv_l.xml +++ b/app/src/main/res/layout/item_outfield_detection_rv_l.xml @@ -13,21 +13,21 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + - - + + - - + android:textSize="@dimen/sp_16" /> @@ -41,6 +39,7 @@ android:id="@+id/measureMajorView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" + android:layout_marginHorizontal="@dimen/dp_5" android:text="电离辐射" android:textColor="@color/red" app:qmui_borderColor="@color/red" /> @@ -56,7 +55,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="催办" - app:qmui_backgroundColor="@color/red" /> + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_remind_equipment_rv_l.xml b/app/src/main/res/layout/item_remind_equipment_rv_l.xml index f063784..0841740 100644 --- a/app/src/main/res/layout/item_remind_equipment_rv_l.xml +++ b/app/src/main/res/layout/item_remind_equipment_rv_l.xml @@ -11,11 +11,19 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + @@ -24,19 +32,10 @@ android:id="@+id/modelView" style="@style/BorderTagStyle" android:layout_gravity="end|center_vertical" - android:layout_marginStart="@dimen/dp_5" android:text="型号A" android:textColor="@color/themeColor" app:qmui_borderColor="@color/themeColor" /> - - + app:qmui_backgroundColor="@color/red" + app:qmui_radiusTopLeft="@dimen/dp_5" /> diff --git a/app/src/main/res/layout/item_select_customer_lv.xml b/app/src/main/res/layout/item_select_customer_lv.xml index 9d9c0d9..e100203 100644 --- a/app/src/main/res/layout/item_select_customer_lv.xml +++ b/app/src/main/res/layout/item_select_customer_lv.xml @@ -6,39 +6,39 @@ android:orientation="horizontal" android:padding="@dimen/dp_15"> + + - - - - + + - - + android:textSize="@dimen/sp_16" /> + + - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d85ef32..254721a 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -15,4 +15,13 @@ #FFF5F5F5 #80F5F5F5 #D8D8D8 + + #E4ECFF + #60A5FF + #DCF7FE + #3CCCE3 + #D8F7F1 + #3CCCE3 + #FDF7E9 + #F9C477 \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 2672ee2..2f88d49 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -22,14 +22,16 @@