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

CardView Background color not the one I set

I am trying to make a RecyclerView with CardView elements , each item having a different color. I am using an Adapter and passing in the resource for the color. The problem is that my elements, instead of having the color I passed in(ex: red, blue,…
0
votes
0 answers

CardView in TabLayout

I want to have TabLayout as this image I want to change text color and background color on selection and elevation effect in XML side if possible. I tried radio button but no luck on styling. This buttons will be dynamic, count and text will be…
Murat
  • 415
  • 7
  • 17
0
votes
0 answers

Android CardView with StaggeredLayout

I am kinda new to Android and I am experimenting with different layouts and so on. Today, I was creating RecyclerView with CardViews as items. All great, but I also found staggered layout manager. So I created RecyclerView with staggered view, and…
golobitch
  • 1,466
  • 3
  • 19
  • 38
0
votes
5 answers

setOnClickListener is not working in my cardapter inside a Fragment

Hi everyone I have an issue while making my cardview clickable inside a fragment, it's basically a recyclerview which have a cardadapter if we get a result the image would be clickable here is my code, any help would be appreciated XML: …
Hass
  • 68
  • 1
  • 10
0
votes
2 answers

How can i use my cardview and slider with scroll page?

i'm writing code for my news application. Now i am making my home page. I have card view and slider in my activity_main.xml but i want to make this page is scrolling. When i add more, it should be scoll. I tried to use Scroll view but it is not…
0
votes
4 answers

prominence of card view layout and divider color

I used CardView layout in list_item.xml "the xml post cell" for RecyclerView", I trying to making the cards prominenced and the color of divider close to gray like this But it appears as like there is no emergence or color of it, this image for…
0
votes
1 answer

I cannot navigate to multiple activities from a single Card View Activity. I can navigate to Only 1

I am using cardview for the first time. I have created 6 cards and made them listen to user click, but only the first cardview works and navigates to the next activity, none of the other work. Even I have tried all the Click Methods. I have tried to…
Bilal Khan
  • 85
  • 6
0
votes
1 answer

Adding Views programatically to a CardView that is inside a RelativeLayout

I need to create CardViews to a RelativeLayout. Inside the CardViews, there are other Views, like ImageViews, and TextViews. They are added, but seems they are not respecting the rules I am adding to the LayoutParams. This is my code: CardView…
Fustigador
  • 6,339
  • 12
  • 59
  • 115
0
votes
0 answers

CardView does not show any data

I have implemented a cardview to display data from a firebase database.I'm following this tutorial for this project.I do almost everything as instructed, but it still does not show any data. My database structure is. Notebook |-0 |-description …
Dorbagna
  • 307
  • 1
  • 4
  • 16
0
votes
1 answer

android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.v7.widget.CardView

I am stuck in this problem from last 4-5 days. I am new to kotlin programming in android so i didn't have any idea about it. While running my app I am getting this error in my Cardview The Error is: E/AndroidRuntime: FATAL EXCEPTION: main …
Alferdize
  • 11
  • 3
0
votes
0 answers

How to overlay view in constraint layout?

I have image view in Constraint Layout and want CardView to overlay it. xml:
0
votes
1 answer

The same elements are being repeated every time in my card view when i tried to display my Json response (retrofit)

my JSON response begins with an JSON array which further contains three arrays inside it. And I want to display the content of these arrays in my card view. It seems in each loop I am always changing the same ViewHolder so the result always will be…
0
votes
1 answer

Each card in the card view has different width

I'm using AndroidStudio 3.2.1 and Java. I have a RecyclerView where the items are displayed using a CardView. My code works fine. However, each card has different width based on its content. What I need is that all cards have the same width as the…
0
votes
1 answer

Delete button in recyclerview is not positioned properly in some cards android

I have to delete images from recyclerview, so for that, I'm added one delete button at the top right corner of the cardview. But in some cards that delete button is positioned properly and in some cards it is not. Here is my XML file code:
0
votes
1 answer

onClickListener not working for card view

Here it's is my activity_main file
Jagdeesh
  • 119
  • 2
  • 14
1 2 3
99
100