findviewbyid简化
This commit is contained in:
@ -49,10 +49,13 @@ public class DisplayUtils {
|
||||
|
||||
/**
|
||||
* 获取状态栏的高度
|
||||
* @param res
|
||||
* @param key
|
||||
* @return
|
||||
* @param resources 资源
|
||||
* @return height
|
||||
*/
|
||||
public static int getStatusBarHeight(Resources resources) {
|
||||
return getInternalDimensionSize(resources, "status_bar_height");
|
||||
}
|
||||
|
||||
public static int getInternalDimensionSize(Resources res, String key) {
|
||||
int result = 0;
|
||||
int resourceId = res.getIdentifier(key, "dimen", "android");
|
||||
|
||||
Reference in New Issue
Block a user