1

I was looking into Google's Material Design CardView, and love the concept, but realize that CardView was only available for devices running on Android 5.0 and up. Since I want to quickly deploy the new design our application, and do not want to wait until most devices are upgraded until 5.0, I was wondering if there would be any other alternative to CardView that would support devices from 4.0 and up.

https://developer.android.com/training/material/lists-cards.html

Thanks in advance

code_legend
  • 3,547
  • 15
  • 51
  • 95

3 Answers3

2

You can use CardView also with a lower API since it's supported. Simply add the following lines in your gradle file:

dependencies {
    compile 'com.android.support:appcompat-v7:21.0.+'
    compile 'com.android.support:cardview-v7:+'
}
Alessandro Roaro
  • 4,665
  • 6
  • 29
  • 48
0

Maybe you should have a look over there (using support library) : https://stackoverflow.com/a/24468117/4232337

As mentionned,

The v7 Support Libraries r21 and above includes the following material design features:

Material design styles for some system widgets when you apply one of the Theme.AppCompat themes.

Color palette theme attributes in the Theme.AppCompat themes.

The RecyclerView widget to display data collections.

The CardView widget to create cards.

The Palette class to extract prominent colors from images.

Hope this helps!

Community
  • 1
  • 1
NSimon
  • 5,212
  • 2
  • 22
  • 36
0

You can use androidx CardView dependency:

dependencies {
     implementation 'androidx.cardview:cardview:1.0.0'
}
Rawnak Yazdani
  • 1,333
  • 2
  • 12
  • 23