|
|
@@ -22,7 +22,7 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
public class FullScreenWithKeyBoardLayout {
|
|
|
|
|
|
|
|
|
- public static void assistActivity(Activity activity, Runnable listener) {
|
|
|
+ public static void assistActivity(Activity activity, Listener listener) {
|
|
|
new FullScreenWithKeyBoardLayout(activity, listener);
|
|
|
}
|
|
|
|
|
|
@@ -31,9 +31,10 @@ public class FullScreenWithKeyBoardLayout {
|
|
|
private int usableHeightPrevious;
|
|
|
private FrameLayout.LayoutParams frameLayoutParams;
|
|
|
private int statusBarHeight = ResourceUtil.getStatusBarHeight();
|
|
|
- private Runnable listener;
|
|
|
+ private Listener listener;
|
|
|
+ private int navBarHeight;
|
|
|
|
|
|
- private FullScreenWithKeyBoardLayout(Activity activity, Runnable listener) {
|
|
|
+ private FullScreenWithKeyBoardLayout(Activity activity, Listener listener) {
|
|
|
this.listener = listener;
|
|
|
isFullScreenVersion = AppUtil.isFullScreenVersion();
|
|
|
|
|
|
@@ -76,10 +77,12 @@ public class FullScreenWithKeyBoardLayout {
|
|
|
h = h + statusBarHeight;
|
|
|
}
|
|
|
|
|
|
+ // 네비 바 높이 저장
|
|
|
+ navBarHeight = usableHeightSansKeyboard - h;
|
|
|
+
|
|
|
frameLayoutParams.height = h;
|
|
|
}
|
|
|
- Log.d("APP# FullScreenWithKeyBoardLayout | possiblyResizeChildOfContent", "|" + " h: " + frameLayoutParams.height);
|
|
|
- listener.run();
|
|
|
+ listener.onScreenResize(this, frameLayoutParams.height, navBarHeight);
|
|
|
childContent.requestLayout();
|
|
|
}
|
|
|
usableHeightPrevious = usableHeightNow;
|
|
|
@@ -96,4 +99,11 @@ public class FullScreenWithKeyBoardLayout {
|
|
|
childContent.getWindowVisibleDisplayFrame(r);
|
|
|
return (r.bottom - r.top);
|
|
|
}
|
|
|
+
|
|
|
+ /***********************************
|
|
|
+ * listener
|
|
|
+ ***********************************/
|
|
|
+ public interface Listener {
|
|
|
+ void onScreenResize(FullScreenWithKeyBoardLayout layout, int height, int navBarHeight);
|
|
|
+ }
|
|
|
}
|