|
|
@@ -147,6 +147,18 @@ public class ResourceUtil {
|
|
|
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, App.getInstance().getContext().getResources().getDisplayMetrics());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 스테이터스바 높이 (px)
|
|
|
+ * - 수동으로 0이 설정 될 수 있음.
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static int getStatusBarHeightManual() {
|
|
|
+ int statusBarHeight = 0;
|
|
|
+// statusBarHeight = getStatusBarHeight();
|
|
|
+ return statusBarHeight;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 스테이터스바 높이 (px)
|
|
|
*
|
|
|
@@ -154,10 +166,10 @@ public class ResourceUtil {
|
|
|
*/
|
|
|
public static int getStatusBarHeight() {
|
|
|
int statusBarHeight = 0;
|
|
|
-// int resId = App.getInstance().getContext().getResources().getIdentifier("status_bar_height", "dimen", "android");
|
|
|
-// if (resId > 0) {
|
|
|
-// statusBarHeight = App.getInstance().getContext().getResources().getDimensionPixelSize(resId);
|
|
|
-// }
|
|
|
+ int resId = App.getInstance().getContext().getResources().getIdentifier("status_bar_height", "dimen", "android");
|
|
|
+ if (resId > 0) {
|
|
|
+ statusBarHeight = App.getInstance().getContext().getResources().getDimensionPixelSize(resId);
|
|
|
+ }
|
|
|
return statusBarHeight;
|
|
|
}
|
|
|
|