public class RongUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static float |
density |
static int |
densityDpi |
static int |
dialogWidth |
static int |
navbarheight |
static float |
scaleDensity |
static int |
screenHeight |
static int |
screenMax |
static int |
screenMin |
static int |
screenWidth |
static int |
statusbarheight |
static float |
xdpi |
static float |
ydpi |
Constructor and Description |
---|
RongUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
dip2px(float dipValue) |
static java.lang.String |
getAppName(android.content.Context context)
Deprecated.
|
static int |
getDialogWidth() |
static android.graphics.drawable.Drawable |
getDrawable(android.content.Context context,
java.lang.String resource) |
static void |
GetInfo(android.content.Context context) |
static int |
getNavBarHeight(android.content.Context context) |
static android.graphics.Bitmap |
getResizedBitmap(android.content.Context context,
android.net.Uri uri,
int widthLimit,
int heightLimit) |
static int |
getScreenHeight() |
static int |
getScreenWidth() |
static int |
getStatusBarHeight(android.content.Context context) |
static android.net.Uri |
getUriFromDrawableRes(android.content.Context context,
int id) |
static int |
getVideoDuration(android.content.Context context,
java.lang.String videoPath)
获取视频文件的时长(时间戳)
|
static void |
init(android.content.Context context) |
static boolean |
isDestroy(android.app.Activity activity) |
static boolean |
isLocationServiceEnabled(android.content.Context context)
检查是否开启定位服务
|
static java.lang.String |
md5(java.lang.Object object)
md5加密
|
static boolean |
phoneIsInUse(android.content.Context context)
是否正在通话中
|
static int |
px2dip(float pxValue) |
public static int screenWidth
public static int screenHeight
public static int screenMin
public static int screenMax
public static float density
public static float scaleDensity
public static float xdpi
public static float ydpi
public static int densityDpi
public static int dialogWidth
public static int statusbarheight
public static int navbarheight
public static int dip2px(float dipValue)
public static int px2dip(float pxValue)
public static int getDialogWidth()
public static void init(android.content.Context context)
public static void GetInfo(android.content.Context context)
public static int getStatusBarHeight(android.content.Context context)
public static int getScreenWidth()
public static int getScreenHeight()
public static int getNavBarHeight(android.content.Context context)
public static android.graphics.drawable.Drawable getDrawable(android.content.Context context, java.lang.String resource)
public static android.net.Uri getUriFromDrawableRes(android.content.Context context, int id)
public static android.graphics.Bitmap getResizedBitmap(android.content.Context context, android.net.Uri uri, int widthLimit, int heightLimit) throws java.io.IOException
java.io.IOException
public static int getVideoDuration(android.content.Context context, java.lang.String videoPath)
public static java.lang.String md5(java.lang.Object object)
@Deprecated public static java.lang.String getAppName(android.content.Context context)
public static boolean isDestroy(android.app.Activity activity)
public static boolean isLocationServiceEnabled(android.content.Context context)
检查定位服务是否开启的方法在不同的系统版本上不一样
public static boolean phoneIsInUse(android.content.Context context)