android.support.design.button.MaterialButton和com.google.android.material.button.MaterialButton之间有什么不同

android.support.design.button.MaterialButton和com.google.android.material.button.MaterialButton之间有什么不同,android,material-design,Android,Material Design,Android Studio 3.3.2 classpath 'com.android.tools.build:gradle:3.3.2' 在我的新安卓项目中,我想使用新安卓材质按钮 我为此找到了两个包: android.support.design.button.MaterialButton com.google.android.material.button.MaterialButton 他们之间有什么不同?我必须使用什么软件包?谷歌正在从设计库(android.support.De

Android Studio 3.3.2

classpath 'com.android.tools.build:gradle:3.3.2'
在我的新安卓项目中,我想使用新安卓材质按钮

我为此找到了两个包:

android.support.design.button.MaterialButton 

com.google.android.material.button.MaterialButton

他们之间有什么不同?我必须使用什么软件包?

谷歌正在从设计库(
android.support.Design
)转移到(
com.Google.android.material

粗略地说:

  • 如果您使用的是AndroidX库,则可能需要Android的材质组件

  • 如果您使用的是较旧的Android支持库工件集,那么您可能需要设计库


MaterialButton
在这两个库中的作用大致相同,不过Android的Material组件提供了更多的主题级控制IIRC。

com.google.Android.Material
v1.0.0=
Android.support.design
v28.0.0。您可以在这里了解Android材质设计组件的开发:我使用AndroidX库。因此,我需要使用“com.google.android.material”。我说的对吗?@Alexei:“需要”是一个强有力的词,但我建议使用
com.google.android.material