| java.lang.Object | |
| ↳ | com.davidluoye.support.utils.OsUtil |
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | SCHEME_ANDROID_RESOURCE | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| OsUtil() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static int | dp2px(int dp) | ||||||||||
| static int | dp2px(Resources res, int dp) | ||||||||||
| static Uri | fromResourceId(String pkg, int resId) | ||||||||||
| static Uri | fromResourceName(String pkg, String type, String name) | ||||||||||
| static int |
getScreenHeight()
get screen height
| ||||||||||
| static int | getScreenHeight(Resources res) | ||||||||||
| static int | getScreenWidth(Resources res) | ||||||||||
| static int |
getScreenWidth()
get screen width
| ||||||||||
| static int |
getScreenWidth(Activity activity)
get screen width
| ||||||||||
| static boolean |
mainProcess(Context context, String processName)
check if current process is the main process.
| ||||||||||
| static int | px2dp(Resources res, int px) | ||||||||||
| static int | px2dp(int px) | ||||||||||
| static int | px2sp(Resources res, int px) | ||||||||||
| static int | px2sp(int px) | ||||||||||
| static int | sp2px(int sp) | ||||||||||
| static int | sp2px(Resources res, int sp) | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
get screen height
get screen width
get screen width
check if current process is the main process.