Commit 56f38c26 authored by jyx's avatar jyx

修改首页展示文字样式

parent a2ac6233
...@@ -109,13 +109,15 @@ class MainFragment : BaseFragment(), View.OnClickListener { ...@@ -109,13 +109,15 @@ class MainFragment : BaseFragment(), View.OnClickListener {
} }
val appWhite = AppSwitchUtil.getAppWhite(requireContext()) val appWhite = AppSwitchUtil.getAppWhite(requireContext())
if (appWhite.size > 0 && !TextUtils.isEmpty(appWhite[0])) { LogUtil.d(appWhite.toString())
if (appWhite.isNotEmpty() && appWhite.size > 1) {
tvSark.text = SpanUtils() tvSark.text = SpanUtils()
.append("已上锁\n") .append("已上锁\n")
.setFontSize(BubbleUtils.sp2px(12)) .setFontSize(BubbleUtils.sp2px(12))
.setForegroundColor(Color.WHITE) .setForegroundColor(Color.WHITE)
.append("" + appWhite.size + "个") .append("" + appWhite.size + "个")
.setForegroundColor(Color.RED) .setForegroundColor(Color.WHITE)
// .setForegroundColor(Color.RED)
.setFontSize(BubbleUtils.sp2px(12)) .setFontSize(BubbleUtils.sp2px(12))
.create() .create()
} else { } else {
...@@ -132,7 +134,8 @@ class MainFragment : BaseFragment(), View.OnClickListener { ...@@ -132,7 +134,8 @@ class MainFragment : BaseFragment(), View.OnClickListener {
.setForegroundColor(Color.WHITE) .setForegroundColor(Color.WHITE)
.setFontSize(BubbleUtils.sp2px(12)) .setFontSize(BubbleUtils.sp2px(12))
.append(AppConfig.lastSpeedData) .append(AppConfig.lastSpeedData)
.setForegroundColor(Color.RED) .setForegroundColor(Color.WHITE)
// .setForegroundColor(Color.RED)
.setFontSize(BubbleUtils.sp2px(12)) .setFontSize(BubbleUtils.sp2px(12))
.create() .create()
} }
...@@ -150,7 +153,8 @@ class MainFragment : BaseFragment(), View.OnClickListener { ...@@ -150,7 +153,8 @@ class MainFragment : BaseFragment(), View.OnClickListener {
.setForegroundColor(Color.WHITE) .setForegroundColor(Color.WHITE)
.setFontSize(BubbleUtils.sp2px(12)) .setFontSize(BubbleUtils.sp2px(12))
.append("${AppConfig.lastCoolData}℃") .append("${AppConfig.lastCoolData}℃")
.setForegroundColor(Color.RED) .setForegroundColor(Color.WHITE)
// .setForegroundColor(Color.RED)
.setFontSize(BubbleUtils.sp2px(12)) .setFontSize(BubbleUtils.sp2px(12))
.create() .create()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment