feat: home
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.yuanxuan.rokid.extension
|
||||
|
||||
import android.content.res.Resources
|
||||
import android.util.TypedValue
|
||||
|
||||
fun Number.dpToPx(): Float {
|
||||
return TypedValue.applyDimension(
|
||||
TypedValue.COMPLEX_UNIT_DIP,
|
||||
this.toFloat(),
|
||||
Resources.getSystem().displayMetrics
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user