fix(android): 키보드(IME)가 입력폼 가리는 문제 — WebView를 키보드 위로 리사이즈
CI / build (push) Failing after 14m59s

- MainActivity 인셋 리스너에 IME 인셋 반영: 하단 패딩 = max(시스템바, 키보드 높이)
  → 키보드가 뜨면 WebView가 키보드 위로 줄어들어 입력 모달이 재배치됨
- AndroidManifest activity에 windowSoftInputMode=adjustResize 추가
- 모달은 기존 max-height+overflow로 스크롤되어 모든 필드 확인 가능
- 네이티브 전용(웹/PC 무영향) → APK 재빌드 필요

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-22 21:53:22 +09:00
parent 43b01da1ff
commit 8cc9cbb383
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -13,6 +13,7 @@
android:label="@string/title_activity_main" android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch" android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask" android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -23,7 +23,11 @@ public class MainActivity extends BridgeActivity {
final View content = findViewById(android.R.id.content); final View content = findViewById(android.R.id.content);
ViewCompat.setOnApplyWindowInsetsListener(content, (v, windowInsets) -> { ViewCompat.setOnApplyWindowInsetsListener(content, (v, windowInsets) -> {
Insets bars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()); Insets bars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(bars.left, bars.top, bars.right, bars.bottom); Insets ime = windowInsets.getInsets(WindowInsetsCompat.Type.ime());
// 키보드(IME)가 올라오면 그 높이만큼 하단 패딩 → WebView가 키보드 위로 줄어든다.
// (입력 모달이 키보드에 가려지지 않고, 포커스된 입력칸이 보이도록 재배치됨)
int bottom = Math.max(bars.bottom, ime.bottom);
v.setPadding(bars.left, bars.top, bars.right, bottom);
return WindowInsetsCompat.CONSUMED; return WindowInsetsCompat.CONSUMED;
}); });
ViewCompat.requestApplyInsets(content); ViewCompat.requestApplyInsets(content);