Questions tagged [cardview]

CardView is a widget for implementing 'card-styled' views in Android.

In Android, a card is a self-contained view similar to Android's FrameLayout (in fact CardView extends FrameLayout) which gives you the possibility of setting up an high contrast between the card and the background through elevation, thus generating more immersive apps.

CardView is often used in combination to RecyclerView. Usually, you would have multiple cards and use the RecyclerView as a container for scrolling between them.

You can read more about cards and recycler view here: https://developer.android.com/training/material/lists-cards.html

568 questions
4
votes
2 answers

CardView in Grid not displaying shadow on all sides

I have recently dropped the idea of adding shadow to GridView items and implemented CardViews. The issue I am facing is the following: the CardView items display no shadow at the borders of the GridView as shown in the picture below: The CardView…
Catalin Ghita
  • 794
  • 8
  • 26
4
votes
2 answers

Android: cardElevation to top

I use this code for elevation to leaner layout
My Name
  • 285
  • 1
  • 4
  • 18
4
votes
4 answers

How to Pass Position of RecyclerView to Activity?

I am trying to pass position of recyclerview to another activity where I am calliing retrofit Interface. Can I pass position of Recyclerview item so I can load different post from api @Override public void onBindViewHolder(TagAdapter.Tag_ViewHolder…
4
votes
2 answers

Card View shadow much thicker at the bottom than at the top

I have an app that uses CardViews very extensively, pretty much for every UI element in each view. I noticed that the shadow around each CardView is much thicker around views close to the bottom than it is around views closer to the top: Any idea…
Nir Arbel
  • 215
  • 1
  • 3
  • 11
4
votes
2 answers

layout-align="center" not working Angular

I am trying to center align the Input/Edit Text in the card using the layout-align attribute. However due to my ignorance and infancy (started learning today), I am unable to figure out why the Edit Text won't get center aligned inside this card…
Umer Farooq
  • 7,356
  • 7
  • 42
  • 67
4
votes
2 answers

Insert a RecyclerView inside another RecyclerView

I am creating a set of 5 cards with the style of Google Now Cards. I am focusing first with the layout in general. I'm using CardView and RecyclerView and what I want to achieve is something like this: This is my CardAdapter(Also the general…
4
votes
3 answers

how to create Horizontal scroll-able CardView

Hi I am try to create a page as below, I have a drawer layout and in the home screen I want to display notifications as in the screen shot. I am trying to do it by CardView but I didn't got any tutorial explaining how I can achieve this in…
kumar
  • 708
  • 4
  • 15
  • 39
4
votes
3 answers

How to get rid of blank spaces around an ImageView inside a CardView

Below screenshot, I am inserting an image, using ImageView, into a CardView. The problem is, I seem can't get rid of the empty space below the Image. (highlighted by light blue) I tried a solution that works, but it requires me to explicitly…
Moses Aprico
  • 1,951
  • 5
  • 30
  • 53
3
votes
2 answers

CardView cardElevation draws random square inside of CardView

A simple problem, I used a CardView to add elevation to a Button but when assigning cardElevation , then the CardView draws a box inside of itself, I tried switching the elevation and other attributes and I can minimize the effect of it by…
Edward Aarma
  • 305
  • 2
  • 8
3
votes
1 answer

How to make image view with rounded edge at bottom with shadow

I want to make my ImageView curved at the bottom with shadow effect. Similar to this image But I don't have any idea about how to do this. Whenever I search on Google or StackOverflow it shows me results related to curved corners but I want curved…
Amol Barge
  • 61
  • 1
  • 9
3
votes
3 answers

Load Details view from Kotlin RecyclerView(cardview) onclick

I have a fragment which has a RecyclerView with items are in CardViews. I have an adapter which will populate the RecyclerView with data from newsapi.org. what I need to achieve is when I click on a item(CardView) to load an activity with image,…
3
votes
2 answers

how can I create ui the same as picture

I am developing android app and how can I create ui like below picture and below my xml I have played around but it is not giving expected output any suggestion will be greatly appreciated and hints welcome I dont know where exactly I am making…
Edgar Shvedskiy
  • 135
  • 3
  • 18
3
votes
2 answers

how to auto resize card view in flutter based on the content

I am facing an issue in flutter where I have a listview inside a card widget. I am reading data from the SQLite database to populate my listview. I don't know how long the listview will be. My problem is that currently I am setting a fixed height…
yoohoo
  • 1,147
  • 4
  • 22
  • 39
3
votes
1 answer

Building custom card using Flutter/Dart

I am trying to build a custom Card using Dart/Flutter widgets, below is the shell of the widget, I am having trouble in positioning elements using Dart! The card's width is intended to take the whole screen's width with the ability to scroll between…
Thorvald
  • 3,424
  • 6
  • 40
  • 66
3
votes
4 answers

CardView with a smaller body and Image floating outside it

I am trying to create a CardView in Android that would have the image look like it is floating outside the box and the CardView box covering it would look smaller. Since I do not know how to better describe it I found a similar design and tried to…
Richard
  • 171
  • 1
  • 2
  • 13
1 2
3
37 38