控制系統 UI 的顯示設定
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
圖 1 系統列,包括 [1] 狀態列和 [2] 導覽列。
系統列是專門用來顯示通知、裝置狀態通訊和裝置導覽的畫面區域。系統列 (由狀態和導覽列組成,如圖 1 所示) 通常會與應用程式同時顯示。顯示沉浸式內容 (例如電影或圖片) 的應用程式可以暫時調暗系統列圖示,減少干擾體驗;或者為了提供完全沉浸式的體驗,系統列會暫時隱藏長條。
如果您熟悉 Android 設計指南,請務必瞭解依照標準 Android UI 指南和使用模式設計應用程式的重要性。修改系統列前,您應審慎考量使用者的需求和期望,因為他們可讓使用者以標準的方式瀏覽裝置及查看狀態。
這個類別說明如何在 Android 版本的不同版本中調暗或隱藏系統資訊列,以提供沉浸式使用者體驗,同時仍能輕鬆存取系統列。
課程
-
調暗系統列
-
瞭解如何調暗狀態列和導覽列。(已淘汰)
-
隱藏狀態列
-
瞭解如何在不同的 Android 版本上隱藏狀態列。
-
隱藏導覽列
-
瞭解如何隱藏導覽列和狀態列。
-
使用沉浸式全螢幕模式
- 瞭解如何在應用程式中打造完全沉浸式體驗。
-
回應 UI 顯示設定變更
- 瞭解如何註冊事件監聽器,以便在系統 UI 瀏覽權限變更時收到通知,以便您據此調整應用程式的 UI。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Control the system UI visibility\n\n**Figure 1.** System bars, including the \\[1\\] status\nbar, and \\[2\\] navigation bar.\n\nThe [system bars](https://material.io/design/platform-guidance/android-bars.html) are screen areas dedicated to the display of notifications, communication\nof device status, and device navigation. Typically the system bars (which consist of the status\nand navigation bars, as shown in figure 1) are displayed\nconcurrently with your app. Apps that display immersive content, such as movies or images,\ncan temporarily dim the system bar icons for a less distracting experience,\nor temporarily hide the bars for a fully immersive experience.\n\nIf you're familiar with the [Android Design\nGuide](/design), you know the importance of designing your apps to conform to standard Android UI\nguidelines and usage patterns. You should carefully consider your users'\nneeds and expectations before modifying the system bars, since they give users a\nstandard way of navigating a device and viewing its status. \n\nThis class describes how to dim or hide system bars across different versions of Android\nto create an immersive user experience, while still preserving easy access to the system\nbars.\n\nLessons\n-------\n\n\n**[Dimming the System Bars](/training/system-ui/dim)**\n:\n Learn how to dim the status and navigation bars. (Deprecated)\n\n\n**[Hiding the Status Bar](/training/system-ui/status)**\n:\n Learn how to hide the status bar on different versions of Android.\n\n\n**[Hiding the Navigation Bar](/training/system-ui/navigation)**\n:\n Learn how to hide the navigation bar, in addition to the status bar.\n\n\n**[Using Immersive Full-Screen Mode](/training/system-ui/immersive)**\n:\n Learn how to create a fully immersive experience in your app.\n\n\n**[Responding to UI Visibility Changes](/training/system-ui/visibility)**\n:\n Learn how to register a listener to get notified of system UI visibility changes\n so that you can adjust your app's UI accordingly."]]