public class ScreenUtil extends Object
| 构造器和说明 |
|---|
ScreenUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
getScreenHeight(android.content.Context context)
获得屏幕高度
|
static int |
getScreenWidth(android.content.Context context)
获得屏幕宽度,单位px
|
static int |
getStatusBarHeight(android.content.Context context)
获取通知栏高度
|
static int |
getTitleBarHeight(android.app.Activity context)
获得标题栏高度
|
public static int getScreenWidth(android.content.Context context)
context - 上下文public static int getScreenHeight(android.content.Context context)
context - 上下文public static int getStatusBarHeight(android.content.Context context)
context - 上下文public static int getTitleBarHeight(android.app.Activity context)
context - 上下文,为Activity对象