본문으로 건너뛰기
Skillpedia
모바일 앱10k · #11934

edge-to-edge

하는 일

이 스킬은 Jetpack Compose 앱을 엣지 투 엣지 화면으로 옮깁니다. 내비게이션 바나 상태 표시줄 뒤에 가려진 버튼과 목록, 키보드와 겹치는 부분을 고칩니다. 화면이 전체 디스플레이를 깔끔하게 채우기를 원하는 Android 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Compose 앱의 버튼이나 목록이 내비게이션 바나 상태 표시줄 뒤에 있을 때.
  • ✓키보드가 Compose 화면의 텍스트 필드를 가릴 때.
  • ✓상태 표시줄이나 내비게이션 바의 글씨가 화면에서 읽기 어려울 때.

스킬 링크

https://github.com/android/skills/blob/main/system/edge-to-edge/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/android/skills/blob/main/system/edge-to-edge/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 Compose 앱의 아래쪽 버튼이 내비게이션 바 뒤에 가려져 있습니다. 앱을 엣지 투 엣지로 바꾸고 고쳐 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 먼저 엣지 투 엣지 지원이 필요한 각 액티비티와 목록을 찾습니다. 그다음 각 액티비티에서 엣지 투 엣지를 켜고, 키보드 크기 조절 모드를 설정하며, 중요한 콘텐츠가 계속 누를 수 있도록 시스템 인셋을 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Prerequisites

  • Project MUST use Android Jetpack Compose.
  • Project MUST target SDK 35 or later. If the SDK is lower than 35, increase the SDK to 35.

Step 1: plan

  1. Locate and analyze all Activity classes to detect which have existing edge-to-edge support. For every Activity without edge-to-edge, plan to make each Activity edge-to-edge.
  2. In each Activity, Locate and analyze all lists and FAB components to detect which have existing edge-to-edge support. For every component without edge-to-edge support, plan to make each of these components edge-to-edge.
  3. In each Activity, scan for TextField, OutlinedTextField, or BasicTextField. If found, then you MUST verify the IME doesn't hide the input field by following the IME section of this skill.

Step 2: add edge-to-edge support

  1. Add enableEdgeToEdge before setContent in onCreate in each Activity that does not already call enableEdgeToEdge.
  2. Add android:windowSoftInputMode="adjustResize" in the AndroidManifest.xml for all Activities that use a soft keyboard.

Step 3: apply insets

  • The app MUST apply system insets, or align content to rulers, so critical UI remains tappable. Choose only one method to avoid double padding:

    1. PREFERRED: When available, use Scaffolds and pass PaddingValues to the content lambda.
    Scaffold { innerPadding ->
        // innerPadding accounts for system bars and any Scaffold components
        LazyColumn(
            modifier = Modifier
                .fillMaxSize()
                .consumeWindowInsets(innerPadding),
            contentPadding = innerPadding
        ) { /* Content */ }
    }
    
    <br />
    1. PREFERRED: When available, use the automatic inset handling or padding modifiers in material components.

      • Material 3 Components manages safe areas for its own components, including:
        • TopAppBar
        • SmallTopAppBar
        • CenterAlignedTopAppBar
        • MediumTopAppBar
        • LargeTopAppBar
        • BottomAppBar
        • ModalDrawerSheet
        • DismissibleDrawerSheet
        • PermanentDrawerSheet
        • ModalBottomSheet
        • NavigationBar
        • NavigationRail
      • For Material 2 Components, use the windowInsetsparameter to apply insets manually for BottomAppBar, TopAppBar and BottomNavigation. DO NOT apply padding to the parent container; instead, pass insets directly to the App Bar component. Applying padding to the parent container prevents the App Bar background from drawing into the system bar area. For example, for TopAppBar, choose only one of the following options:
        1. PREFERRED: TopAppBar(windowInsets = AppBarDefaults.topAppBarWindowInsets)
        2. TopAppBar(windowInsets = WindowInsets.systemBars.exclude(WindowInsets.navigationBars))
        3. TopAppBar(windowInsets = WindowInsets.systemBars.add(WindowInsets.captionBar))
    2. For components outside a Scaffold, use padding modifiers, such as Modifier.safeDrawingPadding() or Modifier.windowInsetsPadding(WindowInsets.safeDrawing).

      Box(
          modifier = Modifier
              .fillMaxSize()
              .safeDrawingPadding()
      ) {
          Button(
              onClick = {},
              modifier = Modifier.align(Alignment.BottomCenter)
          ) {
              Text("Login")
          }
      }
      
      <br />
    3. For deeply nested components with excessive padding, use WindowInsetsRulers (e.g. Modifier.fitInside(WindowInsetsRulers.SafeDrawing.current)). See the IME section for a code sample.

    4. When you need an element (e.g. a custom header or decorative scrim) to equal the dimensions of a system bar, use inset size modifiers (e.g. Modifier.windowInsetsTopHeight(WindowInsets.systemBars)). See the Lists section for a code sample.

Adaptive Scaffolds

  • NavigationSuiteScaffold manages safe areas for its own components, like the NavigationRail or NavigationBar. However, the adaptive scaffolds (e.g. NavigationSuiteScaffold, ListDetailPaneScaffold) don't propagate PaddingValues to their inner contents. You MUST apply insets to individual screens or components (e.g., list contentPadding or FAB padding) as described in Step 3 . DO NOT apply safeDrawingPadding or similar modifiers to the NavigationSuiteScaffold parent. This clips and prevents an edge-to-edge screen.

IME

  • For each Activity with a soft keyboard, check that `andr
자주 묻는 질문

앱이 어떤 Android 대상 버전이어야 하나요?

앱은 SDK 35 이상을 대상으로 해야 하며, 35보다 낮으면 스킬이 35로 올립니다.

패딩을 두 번 추가하나요?

스킬은 이중 패딩을 피하도록 한 가지 방법으로 인셋을 적용하게 설계되어 있습니다.

Android Views 앱도 다루나요?

아니요. 앱이 Jetpack Compose를 사용해야 합니다.

상세 정보

작성자의 원본 설명

Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.

repo: android/skills

인기도

GitHub 스타
10k
순위
#11934
라이선스
Apache-2.0
업데이트
2026. 10. 29.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬