自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
Android“设置”菜单
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本部分介绍了实现和自定义 Android“设置”菜单可以使用的选项。
设置主屏幕
在 Android 7.0 及更高版本中,“设置主屏幕”页面因增添了建议的设置和可自定义的状态通知而得到了增强。此功能可自动实现,且设备实现者可对其进行配置。
这些增强功能的源代码位于以下文件中:
Android 设置设计指南
本文档重点介绍了负责设计 Android 平台设置的所有人员或为 Android 应用设计设置的所有开发者应该遵循的原则和指南。
模式和组件
在 Android 8.0 中,“设置”菜单中增加了一些能够涵盖常见使用情况的组件和微件。我们鼓励设备制造商和开发者在扩展“设置”应用时使用常用组件,以便新界面与现有的“设置”界面保持一致。
Android 8.0 为“设置”应用引入了全新的信息架构,以便简化设置组织方式,让用户更轻松地快速找到自定义 Android 设备所需的设置。Android 9 引入了一些改进,以提供更多设置功能并简化实现。
个性化设置
Android 的“设置”应用为 Android 8.0 用户提供了一系列建议。这些建议通常有助于宣传手机的功能,而且可以自定义(例如“设置‘勿扰’时间安排”或“开启 WLAN 通话功能”)。
通用搜索
Android 8.0 为“设置”菜单添加了经过扩展的搜索功能。本文档介绍了如何添加设置,以及如何确保正确地将其加入“设置”搜索的索引中。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-26。
[[["易于理解","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-03-26。"],[],[],null,["# Android settings menu\n\nThis section describes the options available to you for implementing and\ncustomizing the Android settings menu.\n\nSettings home screen\n--------------------\n\nIn Android 7.0 and higher, the Settings home page is enhanced with suggested\nsettings and customizable status notifications. The feature is implemented\nautomatically, and device implementers can configure it.\n\nThe source code for these enhancements is in these files:\n\n- [SuggestionParser.java](https://android.googlesource.com/platform/packages/apps/SettingsIntelligence/+/refs/heads/android16-release/src/com/android/settings/intelligence/suggestions/SuggestionParser.java)\n- [TileUtils.java](https://android.googlesource.com/platform/frameworks/base/+/fcad09a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java)\n\nAndroid settings design guidelines\n----------------------------------\n\nThis documentation highlights the principles and guidelines for anyone who is\neither designing Android platform settings or any developers designing\nsettings for their Android app.\n\nPatterns and components\n-----------------------\n\nIn Android 8.0, the Settings menu gained several components and widgets that\ncover common uses. Device manufacturers and developers are encouraged to use the\ncommon components when extending the Settings app so new user interfaces stay\nconsistent with the existing Settings UI.\n\nInformation architecture\n------------------------\n\nAndroid 8.0 introduced a new information architecture for the Settings app to\nsimplify the way settings are organized and make it easier for users to quickly\nfind settings to customize their Android devices. Android 9 introduced some\nimprovements to provide more Settings functionality and easier implementation.\n\nPersonalized settings\n---------------------\n\nThe Android Settings app provides a list of suggestions to the users in Android\n8.0. These suggestions typically promote features of the phone, and they are\ncustomizable (e.g., \"Set Do Not Disturb schedule\" or \"Turn on Wi-Fi Calling\").\n\nUniversal search\n----------------\n\nAndroid 8.0 adds expanded search capabilities for the Settings menu. This\ndocument describes how to add a setting and ensure it is properly indexed for\nSettings search."]]