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

not all CardViews are elevated

This is the what my activity currently looks like. I am able to elevate the first two CardView but for the bottom one it is not elevated. I have tried both app:cardElevation and android:elevation but none of the elevates the last card. (by the way…
Seaky Lone
  • 992
  • 1
  • 10
  • 29
0
votes
1 answer

what is wrong in this first item in gridlayout?

In this code i am able to create gridlayout. but the first item is in default view and the rest is like what i want. I try debug and I couldn't see what is wrong. Would you help me to solve this. question="this is a sentence"; …
Handelika
  • 198
  • 3
  • 11
0
votes
1 answer

How can I manage order after swiped card back using previous button after swipe again and previous again?

Question: How can get all previous swiped cards in stack again if a user click on previous button like Google primer app? Explaination: Suppose, I have 10 cards. 001, 002...010. Now I started swiping. I swiped 001, 002 and 003, so I'm currently…
0
votes
2 answers

Cardview is not visible when launching on my device

I'm attempting to use a cardview to show 2 images. Everything seems to work in android studio and i can see my layouts in the design tab perfectly. However, when i run on my tablet the cardview is not showing. The layout is working for a virtual…
Greg
  • 476
  • 9
  • 23
0
votes
1 answer

I want to add horizontally scrolled card view in recyclerview on my Homefragment.java class

Here is my MainActivity.java class package com.example.bottomnavigationdrawer; import androidx.appcompat.app.AppCompatActivity; import androidx.navigation.NavController; import androidx.navigation.Navigation; import…
0
votes
3 answers

How to make CardView noticeable over images?

I am uploading two screenshots for the comparison. CardView noticeable CardView unnoticealbe (when scroll down)
Ssubrat Rrudra
  • 870
  • 8
  • 20
0
votes
1 answer

Retrieve Firebase data with a KEY to a Dialog

I have connected my android app with firebase realtime database. It successfully retrieves data from the database and project through an activity, which is RecyclerView showing a CardView Layout. Now, when I select a specific CARD a DIALOG should…
0
votes
1 answer

java.lang.ClassCastException on CardView only when SearchView is present in layout

I have a problem regarding android layout that I am not able to resolve. I have a fragment with a layout that contains lots of elements and in particular this CardView element
0
votes
2 answers

CardView is not inflating properly using LayoutInflater

I want to add CardView programmatically. Here is my Main Activity XML Layout (activity_main.xml)
0
votes
2 answers

Changing programmatically the background color of LinearLayout

I want to ask you, how to change programmatically the background color of LinearLayout in CardView when the text in TextView equals specify word or is empty. For example field1 getting string "red", the background of LinearLayout gets red. I'm…
Iliyan
  • 39
  • 6
0
votes
1 answer

How to set ImageView in CardView properly

So I'm making a gallery like app and it needs some ScrollView and CardView inside it. This is the screenshot when I put some background in the ImageView This is how it suppose to look, I have removed the background image here I have tried to put an…
GeraldTDPI
  • 71
  • 11
0
votes
2 answers

Android RatingBar fit to width of parent

I don't understand why Android's RatingBar widget doesn't scale to the width I specify in the layout. If I have something simple like
user1795832
  • 2,080
  • 8
  • 29
  • 50
0
votes
1 answer

i have an error in my xml code that stop all the app

i have an error this his my code dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' …
user12246644
0
votes
1 answer

ERROR: Supplied String module notation 'androidx.cardview.widget.CardView' is invalid

Here is my build gradle files implementation 'com.google.firebase:firebase-analytics:17.2.0' implementation 'com.google.firebase:firebase-database:19.1.0' implementation 'com.github.jd-alexander:android-flat-button:v1.1' implementation…
0
votes
2 answers

How to work with 2 ArrayList in RecyclerView?

firstly, I have reviewed all the answers, below. But my problem still continues. How to sort 2 dependent ArrayLists? Add Multiple ArrayLists to RecyclerView arraylist add to new recyclerview how to work with Multidimensional arraylist? How to work…