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
0
votes
1 answer

RecyclerView OnclickListener in CardView

I have a list with recyclerView in which the CardView is visualized through an adapter and within the CardView I have 8 textView. Up to that point everything is perfect, the list is displayed well.But when implementing the onClick to the cardView I…
0
votes
1 answer

How to solve the auto-clicking of buttons in recyclerview? is that a bug?

For my android project, I have used the recycle view in a layout which has 10+ view-holders each has a button and a text. Whenever I click the button in the first item or view-holder, the 8th item is also auto clicked. And when I click the button in…
0
votes
1 answer

How to make a RecylerView like WhatsApp Chat activity?

I building an app which should have a layout almost identical to the one used in WhatsApp in the chat activity. it should have a text input, camera & video recording option. Items should be centered inside the recycler and when the dataset is…
0
votes
1 answer

Fetch data from firebase and add to card view

I want to fetch the data from firebase and add it to cardView. When I fetched title and description, title is displayed but my description isnt displayed. This is my model class: public class News { public String mtitle, mdesc; public…
0
votes
0 answers

CardView insteadOf a FrameLayout makes the dialog wider?

I had a Framelayout with code that makes rounded corners as the framelayout background
0
votes
1 answer

How to change textview text on cardview click?

in a cardview i have an imageview, and two textview. I'm having problems trying to figurate out how to change the text of one of the textview when someone click on the cardview....is this even posible? The card view are controlled by a…
Pedro
  • 1,440
  • 2
  • 15
  • 36
0
votes
5 answers

Shadow not showing on Androidx Cardview

My layout file:
Zorgan
  • 8,227
  • 23
  • 106
  • 207
0
votes
2 answers

Card View not appearing in RecyclerView

I'm building an app that connects to a REST API and retrieves all the Employees in a Database. The app uses a RecyclerView to display all the Employees that are brought back in a CardView. The problem is nothing appears in the RecyclerView, and…
0
votes
1 answer

Android: Attempt to invoke virtual method on a null object reference in onBindViewHolder

My app is supposed to parse JSON data and display it in a recycler view. When I run the app, it crashes with the following error: I've re-checked my code multiple times to make sure I am calling the correct resource files, but I still cant find the…
Gabriel
  • 346
  • 5
  • 24
0
votes
1 answer

How to remove space between cardview and button

I want to remove extra space inside the CardView so the buttons does not have a white border as shown in the picture . This image was captured from my tablet but the Layout looks well in 5 Inch Mobile devices
0
votes
1 answer

How to hide/show a view in the Activity by clicking a button in the Android Cardview?

I am working on a commercial app as an internship. In one of its activity, I have tab view with two fragments. In each fragment, I'm using the card view to hold the views. The card view has one image view, two text views, and a button and in the…
0
votes
1 answer

How to expand a cardView to show hidden elements in android with a dropping animation?

I am beginner in android animations and therefore, am wondering exactly how can I implement something like expand a cardView to show hidden options or elements. For example: a post in social networking, we have a cardView holding the post info. it…
Kaushal
  • 217
  • 1
  • 4
  • 12
0
votes
1 answer

**[UPDATE]** How to animating background expandation of cardview in android?

I'm developing a weather app. In my UI, I have animation like this one below. I want when a use click on CardView, it and it's background expand as much as remaining height of the phone's screen with animation. It's background change with animation…
Mahdi M
  • 57
  • 11
0
votes
1 answer

Text appearance, inside TextView and CardView

When I use TextView to display a text, and set the background color for a example to grey, then the displayed text looks absorbed by this background color. So my idea was to add the TextView to CardView, give the Cardview the backgroundColor, and…
Koala
  • 29
  • 7
0
votes
1 answer

android.support.v7.widget.CardView (Fix Build Path, Edit XML, Create Class) Using Android Studio 3.4

I've been building an app and it's been working well until I updated to the latest Android Studio. I've been getting the error " android.support.v7.widget.CardView (Fix Build Path, Edit XML, Create Class)" My cardview doesn't show the image. The app…
Nobel
  • 13
  • 1
  • 5