I'd like to know the difference between both widgets android.support.v7.widget.CardView
which is added using Android Studio IDE components palette and com.google.android.material.card.MaterialCardView
which is used on Material Design documentation.
Are they two libraries that contains the same widget? Which one should I use and how to take this decision?
I tried to read more the developers.android documentation, but the docs on developer.android are really big with many version and I'm yet a bit confused and couldn't find a good explanation between all of these versions, the history of it all and how it got there. Does someone feel happy to gives me a insight about this history?
Material design documentation usage:
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.google.android.material.card.MaterialCardView>
Source: https://material.io/develop/android/components/material-card-view/
The CardView XML added when using Android Studio:
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.CardView>
com.google.android.material.card.MaterialCardView
extendsandroidx.cardview.widget.CardView
. See developer.android.com/reference/com/google/android/material/… – Allomorphism