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
14
votes
3 answers

How to bring ImageView over the CardView? Please see details

I'm developing an app and I have made the below shown layout: There is a CircleImageView and a CardView. Here's the XML code:
14
votes
1 answer

How do I expand CardViews to show more detail like Google Keep cards?

I have some CardViews in my app and I want them to function like the cards in Google Keep. For example, when I click on a card that has text, it expands (with the animation) into another view. If you're not sure what I mean, create a note on the…
user2900772
  • 319
  • 1
  • 4
  • 8
13
votes
4 answers

Jetpack compose ui : How to create cardview?

I want to create Cardview using jetpack compose but i am not able to find any example.
13
votes
2 answers

Recyclerview lag on scroll due to Admob ads

I want to load ads in RecyclerView ads are loaded successfully but it is casuing so much lag while scrolling Following is code I have written in OnBindViewHolder method of Adapter How to fix this lag? ((DealHolder) holder).adcardView.post(new…
amodkanthe
  • 4,345
  • 6
  • 36
  • 77
13
votes
5 answers

RecyclerView onClick for multiple buttons and handling from Activity

I'm using RecyclerView with CardView and inside the CardView have 2 buttons. Now, have implemented the onClick events by implementing View.OnClickListener by the ViewHolder static class and overriding the event (its working )like @Override …
user2695433
  • 2,013
  • 4
  • 25
  • 44
13
votes
3 answers

Corners ImageView fit inside CardView does not have radius like CardView's corners in Android

I am developing an Android App. In my app I am using CardView and ImageView together. But I am having a problem in designing ImageView inside CardView. The problem is with corner radius radius of ImageView. I have XML layout for adapter item like…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
13
votes
1 answer

Android RecyclerView with CardView - show cards in a stack-like (not a list)

I want to use the RecyclerView which is in the Android support v7 library to display a bunch of CardViews (which is also in the v7 support library), but instead of showing them on a list (in which I can scroll up/down) I want to show them as a stack…
12
votes
4 answers

Element LinearLayout is not allowed in CardView

Note: PLEASE READ THE QUESTION before mark it as duplicate! I've mentioned that the similar question has not solved my problem. I am using android.support.v7.widget.CardView for my layout xml. However when I place a LinearLayout within the…
Joel Min
  • 3,387
  • 3
  • 19
  • 38
12
votes
1 answer

Expanding/Collapsing CardView with click or swipe gesture (Android)?

I'm looking for a solution to this that will allow me to expand a cardview to see more information and then easily collapse it. Google Keep has examples of cards like this. Anyone know how they do this? Would I create 2 versions of my cardview (one…
12
votes
2 answers

LinearLayout flagged if used in CardView

I have used a LinearLayout in a CardView to get a kind of social media login button look and it all runs fine, but Android Studio flags Element LinearLayout is not allowed here. I was wondering why this may be the case? My xml is this…
AmaJayJB
  • 1,453
  • 2
  • 14
  • 21
12
votes
2 answers

Cardview doesn't respect z index order in relative layout

i have a relative layout with two views inside, a CardView and a ImageButton, i need to place the IB above the cardview, but the cardview doesn't respect the z index order. If i replace the cardview with a LinearLayout, it seems to be Ok, so i guess…
Edgar
  • 467
  • 1
  • 8
  • 23
12
votes
3 answers

Override Android-L CardView state_pressed for Older versions of Android

In the latest Android SDK we now have the new CardView, I have replaced my old CustomCardView with the new version, but when running with this on older versions of Android I see that the state_pressed & state_focused are ugly squares which show up…
Smiler
  • 1,316
  • 4
  • 12
  • 18
11
votes
1 answer

Strange shadow behaviour during card flip

I have implemented a card flip animation, like described here. Everything seems to work fine, except the shadows, which behave strangely during the flip (as can be seen here). Because these shadows are caused by the elevation, this graphical error…
Gooz
  • 1,106
  • 2
  • 9
  • 20
11
votes
3 answers

RecyclerView overlapping without shadow

I want to develop List like this picture I had used to RecylerView ItemDecorator for overlap. But it's overlapping without shadow. the screen & decorator code is below public class OverlapDecoration extends RecyclerView.ItemDecoration { private…
Elango
  • 412
  • 4
  • 24