[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Support desktop windowing\n\nDesktop windowing enables users to run multiple apps simultaneously in resizable\napp windows for a versatile, desktop-like experience.\n\nIn figure 1, you can see the organization of the screen with desktop windowing\nenabled. Things to note:\n\n- Users can run multiple apps side by side simultaneously.\n- Taskbar is in a fixed position at the bottom of the display showing the running apps. Users can pin apps for quick access.\n- New customizable header bar decorates the top of each window with controls such as minimize and maximize.\n\n**Figure 1.** Desktop windowing on a tablet.\n\nBy default, apps open full screen on Android tablets.\nTo launch an app in desktop windowing, press and hold the window handle at the\ntop of the screen and drag the handle within the UI, as seen in figure 2.\n\nWhen an app is open in desktop windowing, other apps open in desktop windows as\nwell.\nYour browser doesn't support the video tag. **Figure 2.** Press, hold, and drag the app window handle to enter desktop windowing.\n\nUsers can also invoke desktop windowing from the menu that shows up below the\nwindow handle when you tap or click the handle or use the keyboard shortcut\n\u003ckbd\u003eMeta key (Windows, Command, or Search) + Ctrl + Down\u003c/kbd\u003e.\n\nUsers exit desktop windowing by closing all active windows or by grabbing\nthe window handle at the top of a desktop window and dragging the app to the top\nof the screen. The \u003ckbd\u003eMeta + H\u003c/kbd\u003e keyboard shortcut also exits\ndesktop windowing and runs apps full screen again.\n\nTo return to desktop windowing, tap or click the desktop space tile in the\nRecents screen.\n| **Note:** Desktop windowing is available starting from Android 15 QPR1 as a developer preview for Pixel Tablet (and emulator). Other premium tablets and foldable phones are expected to support the feature in following releases.\n\nResizability and compatibility mode\n-----------------------------------\n\nIn desktop windowing, apps with locked orientation are freely resizable.\nThat means even if an activity is\n[locked to portrait orientation](/guide/topics/manifest/activity-element#screen),\nusers can still resize the app to a landscape orientation window.\nYour browser doesn't support the video tag. **Figure 3.** Resizing the window of a portrait-restricted app to landscape.\n\nApps declared as nonresizable (that is,\n[`resizeableActivity = false`](/guide/topics/manifest/activity-element#resizeableActivity))\nhave their UI scaled while keeping the same aspect ratio.\nYour browser doesn't support the video tag. **Figure 4.** The UI of a nonresizable app scales as the window resizes.\n\nCamera apps that lock the orientation or are declared as nonresizable have a\nspecial treatment for their camera viewfinders: the window is fully resizable,\nbut the viewfinder keeps the same aspect ratio. By assuming apps\nalways run in portrait or landscape, the apps hardcode or otherwise make\nassumptions that lead to miscalculations of the preview or captured image\norientation or aspect ratio resulting in stretched, sideways, or upside-down images.\n\nUntil apps are ready to implement fully responsive camera viewfinders, the\nspecial treatment provides a more basic user experience that mitigates the\neffects wrong assumptions may cause.\n\nTo learn more about compatibility mode for camera apps, see\n[Device compatibility mode](/guide/practices/device-compatibility-mode#camera_preview).\nYour browser doesn't support the video tag. **Figure 5.** Camera viewfinder retains its aspect ratio as the window resizes.\n\nCustomizable header insets\n--------------------------\n\nAll apps running in desktop windowing have a header bar, even in\n[immersive mode](/develop/ui/views/layout/immersive). \n\nEnsure your app's content isn't obscured by the header bar.\nThe header bar is a caption bar inset type:\n[`androidx.compose.foundation.layout.WindowInsets.Companion.captionBar()`](/reference/kotlin/androidx/compose/foundation/layout/package-summary#(androidx.compose.foundation.layout.WindowInsets.Companion).captionBar());\nin views, [`WindowInsets.Type.captionBar()`](/reference/android/view/WindowInsets.Type#captionBar()),\nwhich is part of the system bars.\n\nYou can learn more about handling insets in [Display content edge-to-edge in your app and handle window insets in Compose](/develop/ui/compose/layouts/insets).\n\nThe header bar is also customizable. Android 15 introduced the appearance type\n[`APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND`](/reference/kotlin/android/view/WindowInsetsController#appearance_transparent_caption_bar_background) to make\nthe header bar transparent to allow apps to draw custom content inside\nthe header bar.\n\nApps then become responsible for styling the top portion of their content to\nlook like the caption bar (background, custom content, and so forth) with the\nexception of the system caption elements (close and maximize buttons), which are\ndrawn by the system on the transparent caption bar on top of the app.\n\nApps can toggle the appearance of the system elements inside the caption for\nlight and dark themes using [`APPEARANCE_LIGHT_CAPTION_BARS`](/reference/kotlin/android/view/WindowInsetsController#appearance_light_caption_bars),\nsimilar to how the status bar and navbar are toggled.\n\nAndroid 15 also introduced the\n[`WindowInsets#getBoundingRects()`](/reference/kotlin/android/view/WindowInsets#getboundingrects)\nmethod which enables apps to introspect caption bar insets in more detail.\nApps can differentiate between areas where the system draws system elements and\nunutilized areas where apps can place custom content without overlapping system elements.\n\nThe list of [`Rect`](/reference/kotlin/android/graphics/Rect)\nobjects returned by the API indicates system regions that\nshould be avoided. Any remaining space (calculated by subtracting the rectangles\nfrom the caption bar Insets) is where the app can draw without\noverlapping system elements and with the ability to receive input.\n**Figure 6.** Chrome before and after implementing custom headers. **Note:** By default, input within the caption bar region is handled by the system for its own elements (for example the close button) or to start a drag operation of the desktop window. Apps that customize their app header can request priority input handling for their app UI inside the customizable region by using the [`setSystemGestureExclusionRects()`](/reference/kotlin/android/view/View#setsystemgestureexclusionrects) API.\n\nMultitasking and multi-instance support\n---------------------------------------\n\nMultitasking is at the core of desktop windowing, and allowing multiple\ninstances of your app can highly increase users productivity.\n\nAndroid 15 introduces [PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI](/reference/android/view/WindowManager#PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI),\nwhich apps can set to specify that system UI should be shown for the app to\nallow it to be launched as multiple instances.\n| **Note:** In desktop windowing and other multi-window environments, new tasks open in a new window, so double-check the user journey any time your app starts multiple tasks.\n\nManage app instances with dragging gestures\n-------------------------------------------\n\nIn multi-window mode, users can start a new app instance by dragging a view\nelement out of the app's window.\nUsers can also move elements between instances of the same app.\nYour browser doesn't support the video tag. **Figure 7.** Start a new instance of Chrome by dragging a tab out of the desktop window.\n\nAndroid 15 introduces two flags to customize drag and drop behavior:\n\n- [`DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG`](/reference/kotlin/android/view/View#drag_flag_start_intent_sender_on_unhandled_drag):\n Indicates that an unhandled drag should be delegated to the system to be started\n if no visible window handles the drop.\n When using this flag, the caller must provide\n [`ClipData`](/reference/kotlin/android/content/ClipData) with an\n [`Item`](/reference/kotlin/android/content/ClipData.Item) that contains an\n immutable [`IntentSender`](/reference/kotlin/android/content/IntentSender) to an\n activity to be launched\n (see [`ClipData.Item.Builder#setIntentSender()`](/reference/kotlin/android/content/ClipData.Item.Builder#setintentsender)).\n The system can launch the intent or not based on factors like the current screen\n size or windowing mode. If the system does not launch the intent, the intent is\n canceled by means of the normal drag and drop flow.\n\n- [`DRAG_FLAG_GLOBAL_SAME_APPLICATION`](/reference/kotlin/android/view/View#drag_flag_global_same_application):\n Indicates that a drag operation can cross window boundaries (for multiple instances of the same application).\n\n When [`startDragAndDrop()`](/reference/kotlin/android/view/View#startdraganddrop)\n is called with this flag set, only visible windows belonging to the same\n application are able to participate in the drag operation and receive the dragged content.\n\nYour browser doesn't support the video tag. **Figure 8.** Move a tab between two instances of the Chrome app.\n\nAdditional optimizations\n------------------------\n\nCustomize app launches and transition apps from desktop windowing to full screen.\n\n### Specify default size and position\n\nNot all apps, even if resizable, need a large window to offer user value.\nYou can use the [`ActivityOptions#setLaunchBounds()`](/reference/kotlin/android/app/ActivityOptions#setlaunchbounds)\nmethod to specify a default size and position when an activity is launched.\n\n### Enter full-screen from the desktop space\n\nApps can go full-screen by calling [`Activity#requestFullScreenMode()`](/reference/kotlin/android/app/Activity#requestfullscreenmode).\nThe method displays the app full screen directly from desktop windowing."]]