[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eDialogs are modal windows that require immediate user interaction and retain focus until dismissed or action is taken.\u003c/p\u003e\n"],["\u003cp\u003eUnlike Toasts, which display transient informative messages, Dialogs demand user responses and have higher priority.\u003c/p\u003e\n"],["\u003cp\u003eThey consist of a background, header (optional), content area, and an action area with controls like buttons or list items.\u003c/p\u003e\n"],["\u003cp\u003eOEMs can customize dialog appearance using runtime overlays, adjusting fonts, button styles, dimensions, and placement according to brand guidelines.\u003c/p\u003e\n"],["\u003cp\u003eDialogs should be used sparingly due to their interruptive nature, reserving them for crucial tasks and decisions.\u003c/p\u003e\n"]]],[],null,["# Dialogs\n\n\u003cbr /\u003e\n\nA dialog is a modal window that appears in front of an app to display task information that requires an immediate user response.\n\nA dialog can be an alert, which requires user interaction. It can also be a selection or confirmation dialog, which requires a user to make or confirm a choice. The dialog retains focus until it's dismissed or the required action is taken. Because dialogs are interruptive, they should be used sparingly.\n\nDialogs are related to toasts (both are members of the Dialog family of components), but they differ in purpose and priority, as shown below.\n\n|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|--------------|\n| **Component** | **Purpose** | **Priority** |\n| [Toasts](/cars/design/automotive-os/components/toast) | Displays an informative message. Doesn't require user interaction. Disappears after 8 seconds. | Low |\n| Dialog | Displays information and task options that require user interaction. A dialog retains focus until a user responds. | High |\n\n| **Note:** Dialogs are based on the Dialog component in the Car UI Library. To use the Dialog component, you must [add the Car UI Library as a dependency](https://source.android.com/devices/automotive/hmi/car_ui/integrate) to your app.\n\n*** ** * ** ***\n\nAnatomy\n-------\n\nDialogs contain informational text and UI controls that request a user response.\n1. Dialog background \n2. Card header \n3. Content area \n4. Card action area\n\n*** ** * ** ***\n\nSpecs\n-----\n\n[Layout labels\nDefinitions of E, M, KL, P, Flex](/cars/design/intro-terms#layout_labels) \n[Buttons component\nSpecs, style guidelines, and more](/cars/design/automotive-os/components/buttons) \n[List items component\nSpecs, style guidelines, and more](/cars/design/automotive-os/components/list-items)\n\n### Dialog without title\n\n### Dialog with title\n\n### Dialog with centered title\n\n### Scrollable dialog\n\n*** ** * ** ***\n\nCustomization\n-------------\n\nOEMs can reflect their brand by customizing the following aspects of dialogs:\n\n- Fonts\n- Styling of active, inactive, and disabled buttons\n- Button dimensions and placements\n\n| **Note:** To implement custom dialogs, OEMs must use runtime overlays, explained in the [Car UI Library Integration Guide](https://source.android.com/devices/automotive/hmi/car_ui).\n\n[Design system](/cars/design/automotive-os/design-system/overview) provides guidance for customizing components using layout, color, typography, and sizing.\n\n*** ** * ** ***\n\nExamples\n--------\n\nDialog with title - day Dialog with title - night \nScrollable dialog - day Scrollable dialog - night\nDialog in action"]]