feat: 提示弹窗按原型图V3重设计
- 圆形图标背景(85dp):成功绿/错误红/警告橙 15%透明 - 标题 28sp(原22sp) - 描述 20sp(原15sp) - 倒计时 18sp - 整体居中,大字醒目 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -66,23 +66,28 @@ class QuTipDialog(
|
||||
// 加载 iconfont 字体
|
||||
val typeface = Typeface.createFromAsset(container.context.assets, "font/iconfont.ttf")
|
||||
|
||||
// 设置状态图标和颜色
|
||||
// 设置圆形背景和图标
|
||||
val iconBg = view.findViewById<View>(R.id.tipIconBg)
|
||||
val iconView = view.findViewById<TextView>(R.id.tipIcon)
|
||||
iconView.typeface = typeface
|
||||
when (status) {
|
||||
Status.SUCCESS -> {
|
||||
iconBg.setBackgroundResource(R.drawable.bg_feedback_success)
|
||||
iconView.text = IconFont.SUCCESS
|
||||
iconView.setTextColor(container.context.getColor(R.color.success))
|
||||
}
|
||||
Status.WARNING -> {
|
||||
iconBg.setBackgroundResource(R.drawable.bg_feedback_warning)
|
||||
iconView.text = IconFont.WARNING
|
||||
iconView.setTextColor(container.context.getColor(R.color.warning))
|
||||
}
|
||||
Status.ERROR -> {
|
||||
iconBg.setBackgroundResource(R.drawable.bg_feedback_error)
|
||||
iconView.text = IconFont.ERROR
|
||||
iconView.setTextColor(container.context.getColor(R.color.error))
|
||||
}
|
||||
Status.LOCATION -> {
|
||||
iconBg.setBackgroundResource(R.drawable.bg_feedback_success)
|
||||
iconView.text = IconFont.LOCATION
|
||||
iconView.setTextColor(container.context.getColor(R.color.success))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user