Slice
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Slice 是一种界面模板,可以在 Google 搜索应用中以及 Google 助理中等其他位置显示您应用中的丰富而动态的互动内容。Slice 支持全屏应用体验之外的互动,可以帮助用户更快地执行任务。您可以将 Slice 构建成为与应用有关的 Action的增强功能。
Android Jetpack 内置了对 Slice 的支持,并且可以向后一直扩展到 Android 4.4,覆盖约 95% 的 Android 用户。
您可以查看入门指南,立即开始构建 Slice。
丰富而灵活的布局
使用模板,您可以根据应用的设计自定义 Slice 的颜色、文字、图像、视频等。

动态互动内容
Slice 支持实时数据、滚动内容、内嵌 Action,以及通过深层链接进入您的应用。Slice 还可以包含切换开关和滑块之类的互动控件。

本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Slices are UI templates that can display rich, dynamic, and interactive content\nfrom your app from within the Google Search app and also in other places like\nthe Google Assistant. Slices can help users perform tasks faster by enabling\nengagement outside of the fullscreen app experience. You can build Slices as\nenhancements to [App Actions](/guide/actions).\n\nSupport for Slices is built into [Android Jetpack](/jetpack) and can extend all\nthe way back to Android 4.4, reaching approximately 95% of all Android users.\n\nCheck out the [getting started guide](/guide/slices/getting-started) to start\nbuilding Slices today.\n\nRich and flexible layouts\n-------------------------\n\nUsing [templates](/guide/slices/templates), you can customize your Slices with\ncolor, text, imagery, video, and more to match your app's design.\n\n\nDynamic and interactive content\n-------------------------------\n\nSlices support live-data, scrolling content, inline actions, and deep-linking\ninto your app. Slices can also contain interactive controls like toggles and\nsliders."]]