Package com.breautek.fuse
Class FuseScreenUtils
java.lang.Object
com.breautek.fuse.FuseScreenUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
float
toNativePx
(float px) Takes a scaled webview pixel and returns a native pixelfloat
toWebviewPx
(float px) Takes a native pixel, scales it, and returns a webview pixel
-
Constructor Details
-
FuseScreenUtils
public FuseScreenUtils(androidx.fragment.app.FragmentActivity context)
-
-
Method Details
-
getPixelDensity
public float getPixelDensity() -
toNativePx
public float toNativePx(float px) Takes a scaled webview pixel and returns a native pixel- Parameters:
px
-- Returns:
-
toWebviewPx
public float toWebviewPx(float px) Takes a native pixel, scales it, and returns a webview pixel- Parameters:
px
-- Returns:
-