[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Edge-to-edge design\n\nAn edge-to-edge app takes advantage of the entire screen by drawing UI under the\nsystem bars.\n**Figure 1.** Left. An app that isn't edge-to-edge. Right. An app that is edge-to-edge.\n\nTakeaways\n---------\n\n- Draw background and scrolling content underneath system bars for an edge-to-edge experience.\n- Avoid adding tap gestures or drag targets under system insets; these conflict with edge-to-edge and gesture navigation.\n\n**Figure 2.** An app with gesture insets highlighted green.\n\n### Draw your content behind the system bars\n\nThe edge-to-edge feature lets you draw the UI under the system bars for an\nimmersive experience.\n\nAn app can address overlaps in content by reacting to *insets* . Insets describe\nhow much the content of your app needs to be padded to avoid overlapping with\nsystem bars or with physical device features such as [display cutouts](/develop/ui/views/layout/display-cutout). Read\nabout how to support edge-to-edge and handle insets in [Compose](/develop/ui/compose/layouts/insets) and\n[Views](/develop/ui/views/layout/edge-to-edge).\n\nBe aware of the following types of insets when designing edge-to-edge use cases:\n\n- *System bar insets* apply to UI that is both tappable and shouldn't be visually obscured by the system bars.\n- *System gesture insets* apply to gesture-navigational areas used by the OS that take priority over your app.\n- *Display cutout insets* apply to device areas that extend into the display surface, such as the camera cutout.\n\n### Status bar considerations\n\nSee the [Android System Bars](/design/ui/mobile/guides/foundations/system-bars) for fundamental system bar design guidance. The\nfollowing section discusses additional status bar considerations.\n\n#### Scrolling content\n\nTop app bars should collapse while scrolling. Learn how to [collapse](/develop/ui/compose/components/app-bars#scroll) the\nMaterial 3 TopAppBar. \ncheck_circle\n\n### Do\n\nCollapse the top app bar to status bar height if the app bar is sticky. \ncheck_circle\n\n### Do\n\nAdd a matching background color gradient if the top app bar is not sticky.\n\nStatus bars should be translucent when the UI scrolls underneath, so that the\nstatus bar icons don't look cluttered. To accomplish this, first make a\nscrollable UI edge-to-edge by implementing the steps in the [LazyColumn](/develop/ui/compose/layouts/insets#scaffold) or\n[RecyclerView](/develop/ui/views/layout/recyclerview#enable-edge-to-edge-display) documentation. Then, ensure the system bar is translucent by\ndoing one of the following:\n\n- Rely on the Material 3 TopAppBar automatic protection when [scrolling](/develop/ui/compose/components/app-bars#scroll), if applicable.\n- Create a custom gradient composable or use [GradientProtection](/reference/androidx/core/view/insetscontrast/GradientProtection) for Views. For more information on doing this in compose, see [System bar protection](/develop/ui/compose/layouts/system-bars).\n\n**Figure 3.** An app with gesture insets highlighted green.\n\nFor adaptive layouts, ensure there are separate protections for panes with\ndifferent background colors. \ncancel\n\n### Don´t\n\nHave gradient protection that mismatches each pane's background \ncheck_circle\n\n### Do\n\nHave gradient protection that matches each pane's background.\n\nLikewise, navigation drawers should also have a separate protection from the\nrest of the app.\n**Figure 4.** A translucent status bar for the navigation drawer. This image shows status bar protection for the navigation drawer but not the app.\n\nDon't stack status bar protections, for example by using both the Material 3\nTopAppBar built-in protection and a custom protection.\n\n### Navigation bar considerations\n\nSee the [Android System Bars](/design/ui/mobile/guides/foundations/system-bars) for fundamental navigation bar design guidance.\nThe following section includes additional navigation bar considerations.\n\n#### Scrolling content\n\nBottom app bars should collapse while scrolling. \ncheck_circle\n\n### Do\n\nAdd system bar scrim for three-button navigation when the bottom app bar animates away. \ncheck_circle\n\n### Do\n\nKeep gesture navigation transparent and don't add an additional scrim.\n\n### Display cutouts\n\nDisplay cutouts can affect the appearance of your UI. Apps must handle display\ncutout insets so that important parts of the UI don't draw underneath the\ndisplay cutout. \ncheck_circle\n\n### Do\n\nInset critical UI using display cutout insets. \ncancel\n\n### Don´t\n\nPlace critical UI at the very edge of the screen.\n\nHowever, solid app bar backgrounds should draw into the display cutout as shown\nin the following image.\n**Figure 5.** Solid app bar backgrounds draw into the display cutout while important UI is inset.\n\nEnsure horizontal carousels draw into the display cutout.\n**Figure 6.** An edge-to-edge horizontal display, where the carousel scrolls through the display cutout.\n\nRead about how to support display cutouts in [Compose](/develop/ui/compose/system/cutouts) and [Views](/develop/ui/views/layout/display-cutout).\n\n### Other guidance\n\nIn general, backgrounds and divider lines should also draw edge-to-edge while\ncontent like text and buttons should be inset to avoid the system UI and\nhardware elements."]]