Przeglądaj źródła

[공통][Common] 키보드 등장시 content 백그라운드 색 검정에서 -> 흰색 변경

Hasemi 6 lat temu
rodzic
commit
af1c9fde09

+ 5 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/FullScreenWithKeyBoardLayout.java

@@ -10,6 +10,7 @@ import android.view.View;
 import android.view.WindowManager;
 import android.widget.FrameLayout;
 
+import kr.co.zumo.app.R;
 import kr.co.zumo.app.lifeplus.application.App;
 import kr.co.zumo.app.lifeplus.util.AppUtil;
 import kr.co.zumo.app.lifeplus.util.ResourceUtil;
@@ -37,12 +38,13 @@ public class FullScreenWithKeyBoardLayout {
   private FrameLayout.LayoutParams frameLayoutParams;
   private int statusBarHeight = ResourceUtil.getStatusBarHeight();
   private Runnable listener;
+  private FrameLayout parentContent;
 
   private FullScreenWithKeyBoardLayout(Activity activity, Runnable listener) {
     this.listener = listener;
     isFullScreenVersion = AppUtil.isFullScreenVersion();
 
-    FrameLayout parentContent = activity.findViewById(android.R.id.content);
+    parentContent = activity.findViewById(android.R.id.content);
     childContent = parentContent.getChildAt(0);
     childContent.getViewTreeObserver().addOnGlobalLayoutListener(this::possiblyResizeChildOfContent);
 
@@ -65,6 +67,8 @@ public class FullScreenWithKeyBoardLayout {
           //keyboard probably just became visible
           heightDifference = heightDifference - ResourceUtil.getStatusBarHeightManual();
           frameLayoutParams.height = usableHeightSansKeyboard - heightDifference;
+          //키보드 등장시 검은색 -> 흰색 변경
+          parentContent.setBackgroundColor(ResourceUtil.getColor(R.color.CFFFFFF));
         }
         else {
           //keyboard probably just became hidden