响应式和自适应设计
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。

为了适应不断增大的屏幕尺寸,我们在 ProtoLayout Material 布局模板和 Figma 设计布局中纳入了自适应行为,以便槽位自动调整。从本质上讲,槽的设计目的是填充可用宽度。我们的边距设为百分比,并在屏幕底部和顶部的槽中添加了额外的内边距,以应对屏幕放大时曲线的波动。
为了充分利用更大的屏幕尺寸和额外的空间,不妨考虑利用额外的屏幕空间,让用户访问更多信息或选项,从而提供更多价值。除了内置的响应式行为之外,实现这些布局还需要进行额外的自定义。为此,您可以在断点后面向布局添加更多实用内容。请务必注意,建议的断点设置为 225dp 屏幕尺寸。
基本术语
响应式设计:一种设计方法,可让布局动态设置按钮、文本字段和对话框等元素的格式和位置,以提供最佳用户体验。利用自适应设计实践,在更大的屏幕上自动为用户提供额外价值。无论是一次可查看更多文字、屏幕上显示更多操作,还是更大、更易于访问的点按目标,响应式做法都能为大屏设备用户提供更出色的体验。
自适应设计:一种设计方法,界面会根据已知的用户、设备或环境条件而发生变化。Material 中的自适应设计包括布局和组件自适应。
构建自适应且经过优化的设计
为了确保您的设计布局能够适应较大的屏幕尺寸,我们更新了布局和组件的行为,使其具有内置的响应式行为,包括基于百分比的内边距和内边距。如果您使用的是我们的 ProtoLayout 模板,则可以通过 ProtoLayout API 和Beta 版版本说明自动继承这些更新,并且只需提供在屏幕尺寸断点后添加了其他内容或组件的布局。如需有关如何充分利用更大屏幕尺寸的完整指南和建议,请参阅我们的功能块指南。功能块的屏幕高度是固定的,因此我们调整了内边距,以最大限度地利用有限的屏幕空间,同时避免出现不必要的剪裁。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Responsive and adaptive design\n\nTo accommodate the increasing screen size, we've incorporated responsive behavior into the [ProtoLayout Material layout templates](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).primaryLayout(kotlin.Function1,kotlin.Function1,kotlin.Function1,kotlin.Function1,androidx.wear.protolayout.ModifiersBuilders.Clickable,androidx.wear.protolayout.material3.PrimaryLayoutMargins)) and Figma design layouts, allowing the slots to automatically adapt. In essence, slots are designed to fill the available width. Our margins are set as percentages, with additional inner margins added to slots at the bottom and top of the screen, accounting for fluctuations in the curve of the screen as it enlarges.\n\nTo maximize the larger screen size and additional space, consider utilizing the extra screen space to provide more value by allowing users to access additional information or options. Achieving these layouts requires additional customization beyond the built-in responsive behavior. This can be accomplished by adding more helpful content to the layout after the breakpoint. It's important to note that the recommended breakpoint is set at the 225dp screen size.\n\nEssential terms\n---------------\n\n**Responsive design:** A design approach in which layouts dynamically format and position elements such as buttons, text fields, and dialogs for an optimal user experience. Automatically offer users additional value on larger screens by utilizing responsive design practices. Whether it's more text visible at a glance, more actions on screen, or larger, more accessible tap targets, responsive practices provide an enhanced experience for users of large screens.\n\n**Adaptive design:** A design approach in which the interface changes based on known user, device, or environmental conditions. Adaptive design in Material includes layout and component adaptations.\n\nBuilding responsive and optimized designs\n-----------------------------------------\n\nTo ensure your design layouts adapt to larger screen sizes, we have updated the behavior of our layouts and components to have built-in responsive behavior, including percentage-based margins and padding.\nIf you are using our ProtoLayout templates, you can inherit these updates automatically through the [ProtoLayout API](/design/ui/wear/guides/surfaces/tiles/reference/kotlin/androidx/wear/protolayout/material3/package-summary) and the [beta release notes](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0-beta02), and only need to supply layouts where you have added additional content or components after a screen size breakpoint. For full guidance and recommendations on how to take advantage of a larger screen size, view our [Tiles guidance](/design/ui/wear/guides/surfaces/tiles/wear/guides/surfaces/tiles). Tiles have a fixed screen height, so we've adjusted the padding to maximize the limited screen real estate without creating unwanted clipping."]]