Questions tagged [android-cardview]

CardView is a widget used to show complex lists and cards in your app, it has material design style by default.

CardView is a widget used to show complex lists and cards in your app, it has material design style by default. CardView extends the FrameLayout class and lets you show information inside cards that have a consistent look on any app. CardView widgets can have shadows and rounded corners.

Useful links

2320 questions
10
votes
4 answers

CardView ignoring android:clipChildren="false"

I want to have a CardView which contains an ImageView which overlaps the left border of the CardView. I want to do this by giving the ImageView a negative margin. This works fine with all other layouts (LinearLayout/RelativeLayout/FrameLayout) by…
tymm
  • 543
  • 1
  • 6
  • 18
10
votes
3 answers

"RecyclerView: No Adapter attached; skipping layout" for recyclerview in fragment

I'm getting this error but I don't know what is causing it...perhaps something to do with the fact that this is being initialized in a fragment and not in the activity itself. Edit: included StatsAdapter code public class StatsFragment extends…
10
votes
4 answers

Views not wrapping content inside Card View

Some Views are not wrapping it's content when used inside a CardView in Android L. When testing the same code on earlier versions of Android everything works fine. Here is my layout:
Birk
  • 126
  • 1
  • 2
  • 9
10
votes
1 answer

Expand CardView inside RecyclerView as New Activity like Inbox by Google Android

I'm Using Recycler View as my listview and CardView as list item. I want to expand the Cardview when I click on any item of the list like it expands in inbox app by Google/Gmail. Please guide!
10
votes
2 answers

How to add Android Support v7 libraries in eclipse?

How do I add Android Support v7 libraries in eclipse? For example how do I add CardView to an eclipse android project? Note: This was a self answer question, so no need to waste your time making an answer. Of course, if you have anything to add,…
9
votes
3 answers

When I change the background of a Card view, the corner radius is reset

The situation is that when I modify a Card view background from a program then the corner radius of the Card view reset. But why? (I don't think I need to provide any other information (code, picture of the result, etc.), because I think it's clear…
Noel Nemeth
  • 646
  • 11
  • 21
9
votes
7 answers

How to set a background image for a card in CardView?

I have a card and want to add content to it. How should I add images and also Text to the card? Here is my xml code:
Vedant
  • 422
  • 1
  • 3
  • 21
9
votes
5 answers

android cardview showing border around card

Android cardview is showing unnecessary border around the card. I have tried different things but I am not able to remove it. It happens when I give the card a custom background color. When I remove the cardBackgroundColor, and when default is used.…
Rakesh Yadav
  • 1,966
  • 2
  • 21
  • 35
9
votes
1 answer

How RecyclerView concept works on android?

I have created a basic app using RecyclerView and CardView from get tutorials from websites. App is working fine and I have some confusion.(I am showing my whole code here) confusion is that how code works step by step. So please clear my concept on…
Manish Tiwari
  • 1,806
  • 10
  • 42
  • 65
9
votes
2 answers

CardView cardUseCompatPadding

I am developing an Android app for both Lollipop and Previous versions. I am using CardView (This cardView does not have any child, it simply placed behind my View) to create shadow. But the problem arise when it runs on the pre Lollipop devices. …
9
votes
5 answers

Passing RecyclerView CardView Clicked Item Data To Activity

I have a question about passing clicked cardview data to activity, and here the full story : I have an Activity called "Details", which contains 2 TextViews in it's layout, Title & Description . I have setup a fragment ( tab_1 ) which contain the…
9
votes
3 answers

Adding selectableItemBackground and also coloring background

I have added the selectableItemBackground on CardView that displays on recyclerview. each CardView show text and image. each Card is can be selected, and in order to add ripple effect when clicked I have…
Yuval Levy
  • 2,397
  • 10
  • 44
  • 73
9
votes
3 answers

CardView shadow not rendered when converted to bitmap

THE PROBLEM I'm try to save a view group (which has a CardView as one of its childern) as a PNG file. To achieve this, I inflate the view group and populate the views with required information Load an image to an image view via Glide Add a…
fahmy
  • 3,543
  • 31
  • 47
9
votes
2 answers

Creating a CardView programmatically does not apply style correctly

I'm trying to create a CardView from code. However, it does not seem to apply the style correctly. Here are the styles: