Alexei
Alexei

Reputation: 15726

What is different between: android.support.design.button.MaterialButton and com.google.android.material.button.MaterialButton

Android Studio 3.3.2

classpath 'com.android.tools.build:gradle:3.3.2'

In my new Android project I want to use new android Material button.

I found 2 packages for this:

android.support.design.button.MaterialButton 

com.google.android.material.button.MaterialButton

What is a differences between them? And what package I must use?

Upvotes: 4

Views: 710

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007399

Google is moving from the Design library (android.support.design) to the Material Components for Android (com.google.android.material).

Roughly speaking:

  • If you are using AndroidX libraries, you probably want the Material Components for Android

  • If you are using the older Android Support Library set of artifacts, you probably want the Design library

The role of MaterialButton is about the same in the two libraries, though the Material Components for Android offers more theme-level control IIRC.

Upvotes: 4

Related Questions