pull/1403/head
parent
a57eaf6303
commit
9753d0c608
@ -1,20 +0,0 @@ |
||||
package io.legado.app.utils |
||||
|
||||
import android.content.res.Resources |
||||
|
||||
val Int.dp: Int |
||||
get() = android.util.TypedValue.applyDimension( |
||||
android.util.TypedValue.COMPLEX_UNIT_DIP, |
||||
this.toFloat(), |
||||
Resources.getSystem().displayMetrics |
||||
).toInt() |
||||
|
||||
val Int.sp: Int |
||||
get() = android.util.TypedValue.applyDimension( |
||||
android.util.TypedValue.COMPLEX_UNIT_SP, |
||||
this.toFloat(), |
||||
Resources.getSystem().displayMetrics |
||||
).toInt() |
||||
|
||||
val Int.hexString: String |
||||
get() = Integer.toHexString(this) |
Loading…
Reference in new issue