- InvestPortfolio: 인라인은 최근 5건만, 초과분은 '전체 보기' 스크롤 모달
- 매매 행에 수정(✏)/삭제 버튼 — PUT /trades/{id} 로 매매 수정
- MainActivity: 콘텐츠 루트에 시스템 바 인셋 패딩(CONSUMED) — 에지투에지 소프트키/상태바 겹침 보정
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import android.view.View;
|
||||
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.getcapacitor.BridgeActivity;
|
||||
@@ -15,16 +16,16 @@ public class MainActivity extends BridgeActivity {
|
||||
registerPlugin(CardNotifPlugin.class);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// targetSdk 35+ 의 에지투에지 강제 환경에서 웹뷰가 상태바/소프트키(시스템 내비) 뒤로
|
||||
// 깔리는 것을 방지한다. 시스템 바 인셋만큼 웹뷰에 패딩을 줘서 콘텐츠(하단 고정 내비 포함)가
|
||||
// 항상 안전 영역 안에 오도록 한다. (CSS env(safe-area-*) 가 기기별로 0 을 반환하는 문제 회피)
|
||||
final View webView = getBridge().getWebView();
|
||||
if (webView != null) {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(webView, (v, insets) -> {
|
||||
Insets bars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(bars.left, bars.top, bars.right, bars.bottom);
|
||||
return insets;
|
||||
});
|
||||
}
|
||||
// targetSdk 35+ 의 에지투에지 강제 환경에서 콘텐츠가 상태바/소프트키 뒤로 깔리는 것을 방지.
|
||||
// 구글 권장 패턴: 콘텐츠 루트에 시스템 바 인셋만큼 패딩을 적용하고 인셋을 소비(CONSUMED)한다.
|
||||
// → 헤더는 상태바 아래, 하단 고정 내비는 소프트키 위에 위치.
|
||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
||||
final View content = findViewById(android.R.id.content);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(content, (v, windowInsets) -> {
|
||||
Insets bars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(bars.left, bars.top, bars.right, bars.bottom);
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
});
|
||||
ViewCompat.requestApplyInsets(content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user