unity怎么把材料给组件_我们推荐材料设计组件

unity怎么把材料给组件

Your app exists alongside other apps installed on a user’s phone. We therefore recommend that applications follow the Material Design guidelines to ensure that apps operate consistently, that patterns learned in one app can be used in another.

您的应用与用户手机上安装的其他应用并存。 因此,我们建议应用程序遵循“ 材料设计”准则,以确保应用程序始终运行,并且在一个应用程序中学习到的模式可以在另一个应用程序中使用。

Android users expect your app to look and behave in a way that’s consistent with the platform. You should follow material design guidelines for visual and navigation patterns… — d.android.com/design

Android用户希望您的应用外观和行为与平台保持一致。 您应遵循视觉和导航模式的材料设计准则…— d.android.com/design

To implement this, use the Material Design Components (MDC) library. This blog post outlines the many benefits of using MDC, explaining why it’s our recommended solution.

实现这一点,请使用材料设计组件 (MDC)库。 这篇博客文章概述了使用MDC的许多好处,并解释了为什么它是我们推荐的解决方案。

小部件 (Widgets)

Image for post

MDC provides styled versions of standard widgets making it easy to implement Material styling. For example Material offers styled versions of Buttons, Toolbars, CheckBoxes and more. If you use a MaterialComponents theme, then Material widgets will be instantiated instead of the stock components when you inflate a layout (by MDC’s View Inflater) so it’s easy to achieve Material styling without having to make large updates to your layouts:

MDC提供了标准小部件的样式化版本,可轻松实现Material样式。 例如,Material提供ButtonsToolbarsCheckBox es等的样式版本。 如果您使用MaterialComponents主题,那么当您为布局充气(通过MDC的View Inflater )时,将实例化Material小部件而不是库存组件,因此可以轻松实现Material样式,而无需对布局进行大的更新:

All Material widgets extend their relevant AppCompat counterparts so they benefit from the same backported functionality or bug fixes.

所有Material窗口小部件都扩展了与它们对应的AppCompat对应版本,因此它们将从相同的向后移植功能或错误修复中受益。

Material widgets offer extra styling and functionality over their platform or AppCompat counterparts, for example MaterialButton offers a number of different display styles :

材质小部件在其平台或AppCompat同类产品上提供了额外的样式和功能,例如MaterialButton提供了多种不同的显示样式:

Image for post

One of my favorite additions is TextViews being replaced with MaterialTextViews which add support for specifying line heights in TextAppearances. Handy.

我最喜欢的功能之一是将TextView替换为MaterialTextView ,它增加了对在TextAppearance指定行高的支持。 便利。

As well as adding to existing widgets, MDC offers a number of new widgets, not available in the platform or AppCompat. You’ve likely seen Bottom Navigation, Bottom Sheet and Floating Action Buttons but might not have come across Chips, Date Picker or Time Picker.

除了添加到现有的小部件之外,MDC还提供了许多新的小部件,这些新的小部件在平台或AppCompat不可用。 您可能已经看到了“ 底部导航” ,“ 底部工作表”和“ 浮动操作按钮”,但可能没有遇到“ 筹码” ,“ 日期选择器”或“ 时间选择器”

Image for post

For a complete list of components offered by the library, see the components section here.

有关库提供的组件的完整列表,请参见此处的组件部分。

物质主题 (Material Theming)

Image for post

Material Theming is a systematic way to customize Material Design to reflect your product’s brand. A Material Theme comprises color, typography and shape attributes. Customizing these will be automatically reflected in the components you use to build your app.

材料主题自定义材料设计以反映产品品牌的系统方法。 材质主题包含颜色版式形状属性。 自定义这些内容将自动反映在您用于构建应用程序的组件中。

You can think of Material Theming as a design system for creating design systems 🤯. You configure the color, type and shape inputs and get out a complete design system for your brand.

您可以将材料主题视为创建设计系统的设计系统。 您可以配置颜色,类型和形状输入,并获得适用于您品牌的完整设计系统。

Nick Rout goes in depth into each of the three sub-systems in the following posts:

Nick Rout在以下帖子中深入介绍了三个子系统中的每个子系统:

黑暗主题 (Dark Theme)

Image for post

MDC widgets implement Material’s dark theme guidance, with many widgets adapting their colors to dark themes and offering elevation overlays to communicate elevation when shadows don’t read.

MDC小部件实现了Material的深色主题指南 ,许多小部件将其颜色调整为深色主题,并提供高程覆盖层以在看不到阴影时传达高程。

Chris Banes goes in depth about MDC’s dark theme support in this article:

Chris Banes在本文中深入探讨了MDC的深色主题支持:

物质运动🆕 (Material Motion 🆕)

Image for post

Material Design provides guidance for screen transitions. Better than guidance alone, MDC now implements these patterns as Transitions ready to be dropped into your app.

材料设计为屏幕过渡提供指导 。 现在,MDC不仅可以提供指导,而且还可以将这些模式实施为过渡,可以将它们放入您的应用中。

Hunter Stich introduces you to the material motion library in this post:

Hunter Stich在这篇文章中向您介绍了材质运动库:

组成 (Get Composed)

Jetpack Compose is Android’s next-generation UI toolkit, currently in alpha. While it is not yet stable, it will offer an implementation of material components and material theming. Adopting MDC now will prepare your codebase for later adopting Jetpack Compose — it uses the same concepts, design vocabulary and components. It even becomes possible to ease your migration with libraries like MDC-Android Compose Theme Adapter which converts an MDC XML theme into a Compose MaterialTheme.

Jetpack Compose是Android的下一代UI工具包,目前处于Alpha状态。 虽然还不稳定,但是它将提供材料组件和材料主题的实现。 现在采用MDC将为您的代码库做准备,以供以后采用Jetpack Compose –它使用相同的概念,设计词汇和组件。 甚至可以使用MDC-Android Compose Theme Adapter之类的库来简化您的迁移,该库将MDC XML主题转换为Compose MaterialTheme

材料推荐 (Material Recommendation)

Hopefully it’s clear to see why we recommend building Android UI with Material Design Components. We’ve recently updated the File > New Project template in Android Studio to use MDC and set up a material theme for you, making it even easier to get started. If you haven’t already migrated to MDC, then check out our migration guide:

希望我们可以清楚地看到为什么我们建议使用Material Design Components构建Android UI。 我们最近更新了Android Studio中的“ File > New Project模板,以使用MDC并为您设置一个材质主题,使入门变得更加容易。 如果您尚未迁移到MDC,请查看我们的迁移指南:

翻译自: https://medium.com/androiddevelopers/we-recommend-material-design-components-81e6d165c2dd

unity怎么把材料给组件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值