Reputation: 3084
I use RecylerView
and CardView
in my app and this my dependencies in build.gradle
file:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'co.ronash.pushe:android-lib:0.9.1'
compile('com.mikepenz:materialdrawer:5.1.2@aar') {
transitive = true
}
compile('com.mikepenz:crossfadedrawerlayout:0.3.2@aar')
compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
compile 'com.mikepenz:octicons-typeface:3.0.0.1@aar'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
compile 'com.github.bluejamesbond:textjustify-android:2.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.jd-alexander:LikeButton:0.2.0'
compile project(':material_rey')
}
my app works in kitkat correctly. Should I add these dependencies to my build.gradle or not? what is the difference?
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
I use Android Studio 2.0 . when I run my app on SAMSUNG A5 with android 5.1.1 (lollipop) my RecyclerView
doesn't scroll and my CardView
doesn't have shadow and corner. I try solutions suggested in SO such as adding card_view:cardUseCompatPadding="true"
or adding margin .even change xmlns:card_view="http://schemas.android.com/apk/res-auto"
to xmlns:card_view="http://schemas.android.com/tools"
doesn't work.
Are these issues relative to dependencies?
Upvotes: 0
Views: 1708
Reputation: 10939
com.android.support:design:23.2.1 includes RecyclerView in it. While cardView is not mentioned in the link, but if you are not finding any errors, and cardview is rendering then, it too is included. Hence, you needn't add these to the dependencies.
Recyclerview will not scroll if its rows fit in the screen. You can raise separate SO questions for these.
Upvotes: 1