findviewbyid简化

This commit is contained in:
huangzhuanghua
2017-01-16 12:28:15 +08:00
parent dd0f475944
commit 0ca70316dc
45 changed files with 163 additions and 263 deletions

View File

@ -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");