修改会员tab样式,修改认证状态样式

This commit is contained in:
wangyu 2026-01-15 18:39:32 +08:00
parent 2b792be289
commit 5ac719d5bb
11 changed files with 44 additions and 8 deletions

View File

@ -1,6 +1,7 @@
package com.cheng.blzb.ui.fragment.mine.auth
import android.annotation.SuppressLint
import android.graphics.Color
import android.text.TextUtils
import android.view.ViewTreeObserver
import androidx.activity.result.contract.ActivityResultContracts
@ -24,6 +25,7 @@ import com.cheng.blzb.ui.fragment.photo.PhotoViewFragment
import com.cheng.blzb.utils.FileProviderUtils
import com.cheng.blzb.utils.PermissionUtils
import com.example.base.common.RxBus
import com.example.base.extensions.getColor
import com.example.base.extensions.gone
import com.example.base.extensions.onClick
import com.example.base.extensions.toast
@ -225,16 +227,20 @@ class CompanyAuthFragment : BaseFragment<FragmentCompanyAuthBinding, CompanyAuth
}
"2" -> {
binding.tvStatus.text = "认证成功"
binding.tvStatus.setTextColor(getColor(R.color.color_3bbf0f))
binding.tvStatus.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_auth_success, 0, 0, 0)
binding.tvReason.gone()
binding.layoutRejectReason.setLayoutBackground(getColor(R.color.color_e3fae7))
binding.layoutRejectReason.visible()
binding.btnNext.text = "重新提交"
}
"3" -> {
binding.tvStatus.text = "认证失败"
binding.tvStatus.setTextColor(getColor(R.color.color_ff592b))
binding.tvStatus.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_auth_fail, 0, 0, 0)
binding.tvReason.text = "理由:${detail.remark}"
binding.layoutRejectReason.setLayoutBackground(getColor(R.color.color_fff5f3))
binding.layoutRejectReason.visible()
binding.btnNext.text = "重新提交"

View File

@ -496,9 +496,9 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
payTypeCheckedRes = R.mipmap.ic_pay_checked1
binding.btnTab1.setTextColor(getColor(R.color.color_c5ffe1))
binding.btnTab1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_checked, 0, 0, 0)
binding.btnTab1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_checked1, 0, 0, 0)
binding.btnTab2.setTextColor(getColor(R.color.color_8a7570))
binding.btnTab2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_default, 0, 0, 0)
binding.btnTab2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_default2, 0, 0, 0)
binding.ivTopBg.setImageResource(R.mipmap.ic_vip_top_bg1)
binding.layoutPay.setBackgroundResource(R.mipmap.ic_vip_pay_bg1)
@ -527,9 +527,9 @@ class VipFragment : BaseFragment<FragmentVipBinding, VipViewModel>() {
payTypeCheckedRes = R.mipmap.ic_pay_checked2
binding.btnTab1.setTextColor(getColor(R.color.color_8a7570))
binding.btnTab1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_default, 0, 0, 0)
binding.btnTab1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_default1, 0, 0, 0)
binding.btnTab2.setTextColor(getColor(R.color.color_c5ffe1))
binding.btnTab2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_checked, 0, 0, 0)
binding.btnTab2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.shape_vip_tab_checked2, 0, 0, 0)
binding.ivTopBg.setImageResource(R.mipmap.ic_vip_top_bg2)
binding.layoutPay.setBackgroundResource(R.mipmap.ic_vip_pay_bg2)

View File

@ -10,6 +10,6 @@
android:width="@dimen/dp_20"
android:height="@dimen/dp_20"
android:gravity="center">
<bitmap android:src="@mipmap/ic_vip_tab_checked" />
<bitmap android:src="@mipmap/ic_vip_tab_checked1" />
</item>
</layer-list>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="@dimen/dp_46"
android:height="@dimen/dp_35"
android:gravity="center">
<bitmap android:src="@mipmap/ic_vip_tab_checked_bg" />
</item>
<item
android:width="@dimen/dp_20"
android:height="@dimen/dp_20"
android:gravity="center">
<bitmap android:src="@mipmap/ic_vip_tab_checked2" />
</item>
</layer-list>

View File

@ -10,6 +10,6 @@
android:width="@dimen/dp_20"
android:height="@dimen/dp_20"
android:gravity="center">
<bitmap android:src="@mipmap/ic_vip_tab_default" />
<bitmap android:src="@mipmap/ic_vip_tab_default1" />
</item>
</layer-list>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="@dimen/dp_46"
android:height="@dimen/dp_35"
android:gravity="center">
<color android:color="@color/transparent" />
</item>
<item
android:width="@dimen/dp_20"
android:height="@dimen/dp_20"
android:gravity="center">
<bitmap android:src="@mipmap/ic_vip_tab_default2" />
</item>
</layer-list>

View File

@ -48,7 +48,7 @@
android:id="@+id/btn_tab1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:drawableStart="@drawable/shape_vip_tab_checked"
android:drawableStart="@drawable/shape_vip_tab_checked1"
android:text="个人会员"
android:textColor="@color/color_c5ffe1"
android:textSize="@dimen/sp_16"
@ -61,7 +61,7 @@
android:id="@+id/btn_tab2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:drawableStart="@drawable/shape_vip_tab_default"
android:drawableStart="@drawable/shape_vip_tab_default2"
android:text="企业会员"
android:textColor="@color/color_8a7570"
android:textSize="@dimen/sp_16"

View File

Before

Width:  |  Height:  |  Size: 886 B

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB