change style

This commit is contained in:
Li ZongYing
2024-04-19 19:26:06 +08:00
parent ca82d5409f
commit 716efb5a83
21 changed files with 232 additions and 53 deletions
@@ -77,5 +77,15 @@ object Utils {
).toInt()
}
fun pxToDp(px: Float): Int {
val scale = Resources.getSystem().displayMetrics.density
return (px / scale).toInt()
}
fun pxToDp(px: Int): Int {
val scale = Resources.getSystem().displayMetrics.density
return (px / scale).toInt()
}
fun isTmallDevice() = Build.MANUFACTURER.equals("Tmall", ignoreCase = true)
}