3

I have searched the internet but i couldn't find my answer. How can I use Card view/Recycle view they are not in my layout palette or i can't use them manually and I am using eclipse

amir R-ian
  • 61
  • 1
  • 7

3 Answers3

9

The CardView and RecycleView are not by default in the AppCompat library. You should include the CardView and RecycleView libraries manual to your project.

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

Gradle (using Android Studio):

dependencies {
    compile 'com.android.support:appcompat-v7:21.0.+'
    compile 'com.android.support:cardview-v7:21.0.+'
    compile 'com.android.support:recyclerview-v7:21.0.+'
}
Rolf ツ
  • 8,611
  • 6
  • 47
  • 72
1

In the layout palette there is a section called "Custom" click on the "CustomView" and you shall see all the imported views from the dependencies added in the gradle file. enter image description here

Tim Glenn
  • 224
  • 2
  • 8
0

my problem when adding the library was the same as this guys problem

Unable to add library to android project

so I fixed it.

Community
  • 1
  • 1
amir R-ian
  • 61
  • 1
  • 7