From 0f30cf3880849eacf59df149f76d13c275746611 Mon Sep 17 00:00:00 2001 From: klaus Date: Wed, 5 Nov 2025 11:56:36 +0900 Subject: [PATCH] =?UTF-8?q?fix(chat):=20IME=20=EC=9D=B8=EC=85=8B=20?= =?UTF-8?q?=EB=B3=91=ED=95=A9=EC=9C=BC=EB=A1=9C=20=ED=82=A4=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=20=ED=91=9C=EC=8B=9C=20=EC=8B=9C=20=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=20=EC=98=81=EC=97=AD=20=EA=B0=80=EB=A6=BC=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BaseActivity의 WindowInsets 리스너에서 systemBars와 ime 인셋의 각 방향별 최대값을 루트 패딩에 반영 - Edge-to-Edge 환경에서 하단 패딩이 키보드 높이만큼 확보되도록 개선 - ChatRoomActivity의 deprecated 설정 없이도 동작 유지 --- .../kr/co/vividnext/sodalive/base/BaseActivity.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/base/BaseActivity.kt b/app/src/main/java/kr/co/vividnext/sodalive/base/BaseActivity.kt index f0522ef3..f73d9cc6 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/base/BaseActivity.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/base/BaseActivity.kt @@ -17,6 +17,7 @@ import androidx.core.view.WindowInsetsControllerCompat import androidx.localbroadcastmanager.content.LocalBroadcastManager import androidx.viewbinding.ViewBinding import io.reactivex.rxjava3.disposables.CompositeDisposable +import kotlin.math.max abstract class BaseActivity( private val inflate: (LayoutInflater) -> T @@ -66,10 +67,15 @@ abstract class BaseActivity( setupView() ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets -> - val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars()) + val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()) + val ime = insets.getInsets(WindowInsetsCompat.Type.ime()) - // 루트는 좌/우/하만 처리(상단은 Toolbar에 위임) - v.setPadding(bars.left, bars.top, bars.right, bars.bottom) + // 루트는 좌/우/하만 처리(상단은 Toolbar에 위임). IME가 등장하면 하단 패딩을 IME 높이까지 확장 + val left = max(systemBars.left, ime.left) + val top = systemBars.top + val right = max(systemBars.right, ime.right) + val bottom = max(systemBars.bottom, ime.bottom) + v.setPadding(left, top, right, bottom) insets }