|
|
@@ -1,11 +1,16 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.custom;
|
|
|
|
|
|
import android.app.Activity;
|
|
|
+import android.content.Context;
|
|
|
import android.graphics.Rect;
|
|
|
+import android.util.DisplayMetrics;
|
|
|
import android.util.Log;
|
|
|
+import android.view.Display;
|
|
|
import android.view.View;
|
|
|
+import android.view.WindowManager;
|
|
|
import android.widget.FrameLayout;
|
|
|
|
|
|
+import kr.co.zumo.app.lifeplus.application.App;
|
|
|
import kr.co.zumo.app.lifeplus.util.AppUtil;
|
|
|
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
|
|
|
@@ -75,6 +80,25 @@ public class FullScreenWithKeyBoardLayout {
|
|
|
if (isFullScreenVersion) {
|
|
|
h = h + statusBarHeight;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * nav bar 가 있고, nav height 도 있는데 화면 높이가 real - nav height 보다 크다면 nav bar 높이가 적용되지 않은 것이므로 이를 적용한다. *
|
|
|
+ */
|
|
|
+ // getRealMetrics is only available with API 17 and +
|
|
|
+ int realHeight = usableHeightSansKeyboard;
|
|
|
+ WindowManager wm = (WindowManager) App.getInstance().getContext().getSystemService(Context.WINDOW_SERVICE);
|
|
|
+ if (wm != null) {
|
|
|
+ Display display = wm.getDefaultDisplay();
|
|
|
+ DisplayMetrics metrics = new DisplayMetrics();
|
|
|
+ display.getRealMetrics(metrics);
|
|
|
+ realHeight = metrics.heightPixels;
|
|
|
+ }
|
|
|
+
|
|
|
+ int navHeight = ResourceUtil.getNavBarHeight();
|
|
|
+ if (realHeight > 0 && AppUtil.hasNavBar() && navHeight > 0 && usableHeightNow > realHeight - navHeight) {
|
|
|
+ h -= navHeight;
|
|
|
+ }
|
|
|
+
|
|
|
frameLayoutParams.height = h;
|
|
|
}
|
|
|
Log.d("APP# FullScreenWithKeyBoardLayout | possiblyResizeChildOfContent", "|" + " h: " + frameLayoutParams.height);
|