Package com.zopim.android.sdk.util
Class Dimensions
- java.lang.Object
-
- com.zopim.android.sdk.util.Dimensions
-
public class Dimensions extends java.lang.Object
Definition of helper class that does dimension conversion operations.
-
-
Constructor Summary
Constructors Constructor and Description Dimensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static int
convertDpToPixel(Context context, float dp)
This method converts dp unit to equivalent pixels, depending on device density.
-
-
-
Method Detail
-
convertDpToPixel
public static int convertDpToPixel(Context context, float dp)
This method converts dp unit to equivalent pixels, depending on device density.- Parameters:
dp
- A value in dp (density independent pixels) unit. Which we need to convert into pixelscontext
- Context to get resources and device specific display metrics- Returns:
- A int value to represent pixels equivalent to dp depending on device density
-
-