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
Asked
Active
Viewed 4,195 times
3 Answers
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
-
I don't know how to add them manually can you give me more details @Rolf – amir R-ian Feb 06 '15 at 18:39
-
Do you use Eclipse or Android Studio? – Rolf ツ Feb 06 '15 at 18:41
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.

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