- 注释掉全部 Compose UI 代码(ui/、theme/、NavController、MainActivity、InitActivity 等) - BorderExt、TextExt、ToastUtils、LoadingState 中的 Compose 逻辑全部注释 - LoadingState 保留 show()/hide() 空方法避免编译报错 - 注释 SensorScaleUtils、BaseViewModel、DeviceViewModel 中的 ToastUtils 调用 - BootReceiver、CrashHandler 中 MainActivity 替换为 HomeActivity - UserViewModel、PurchaseOrderActivity 删除残余 Compose import - build.gradle.kts 替换为非 Compose 的 activity-ktx 和 coil 依赖 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
1.3 KiB
Kotlin
34 lines
1.3 KiB
Kotlin
//package com.sw.inbound.ext
|
|
//
|
|
//import androidx.annotation.ColorRes
|
|
//import androidx.compose.runtime.Composable
|
|
//import androidx.compose.ui.graphics.Color
|
|
//import androidx.compose.ui.res.colorResource
|
|
//import androidx.compose.ui.text.TextStyle
|
|
//import androidx.compose.ui.text.font.FontWeight
|
|
//import androidx.compose.ui.text.style.TextAlign
|
|
//import androidx.compose.ui.unit.TextUnit
|
|
//import androidx.compose.ui.unit.sp
|
|
//
|
|
//// 快速修改颜色
|
|
//fun TextStyle.withColor(color: Color): TextStyle = this.copy(color = color)
|
|
//
|
|
//@Composable
|
|
//fun TextStyle.withColorRes(@ColorRes colorRes: Int): TextStyle {
|
|
// return this.copy(color = colorResource(id = colorRes))
|
|
//}
|
|
//
|
|
//// 快速修改字体大小
|
|
//fun TextStyle.withSize(size: TextUnit): TextStyle = this.copy(fontSize = size)
|
|
//
|
|
//fun TextStyle.withSizeSp(sp: Float): TextStyle = this.copy(fontSize = sp.sp)
|
|
//
|
|
//// 快速修改字体粗细
|
|
//fun TextStyle.withWeight(weight: FontWeight): TextStyle = this.copy(fontWeight = weight)
|
|
//
|
|
//fun TextStyle.bold(): TextStyle = this.copy(fontWeight = FontWeight.Bold)
|
|
//fun TextStyle.medium(): TextStyle = this.copy(fontWeight = FontWeight.Medium)
|
|
//fun TextStyle.light(): TextStyle = this.copy(fontWeight = FontWeight.Light)
|
|
//
|
|
//fun TextStyle.textAlign(textAlign: TextAlign): TextStyle = this.copy(textAlign = textAlign)
|