6

Today I was Googling for "material design components" I ended up at this site:

https://material.io/components/

As I remember, I've never seen it before.

In the Android section there are instruction to use the components and ok, it seems to be the well-known Android Design Support Library:

Screenshot of dependencies

But what intrigues me is that there are components there that are not in the design library, such as:

Back Layer Layout, Material Card and Material Button.

The docs for these classes seems to be not ready yet and the links points to nowhere, like: material button doc.

There is something in the github site.

Sorry for ignorance, but what is the purpose of this site? Is it something future or something left behind?

4

2 回答 2

8

Android 设计支持库是 Material Design 组件的前身。从支持库 28.0.0-alpha1 版本开始,设计库现在包含材料设计组件中引入的所有新组件:

我们引入了新的应用程序主题 Theme.MaterialComponents,其中包含新的属性和更新的组件样式。

我们添加了以下组件:

  • 底部应用栏
  • 芯片
  • 芯片组
  • 材质按钮
  • MaterialCardView

虽然该28.0.0-alpha1版本确实包含所有新类,但 developer.android.com 上的文档尚未包含来自设计库的更新(将文档有效地保留在以前公开可用的内容上),但如果您使用它们肯定会存在那个依赖。

于 2018-04-10T05:08:27.873 回答
2

支持库现在可通过 Google 的 Maven 存储库获得。我们不再支持通过 SDK 管理器下载库,并且该功能将很快被删除。

as the Support Library Setup says. And this repository and material library within it will be offical to use.

Latest dependencies to use material components is:

com.google.android.material:material:1.0.0-alpha1

Getting started with Material Components for Android will help you to setup your project.

于 2018-05-09T14:16:06.213 回答