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
0
votes
2 answers

How to move Recycleview item to Fragment of navigation Drawer?

I want to start intent from ViewHolder class to the Fragment of Navigation Drawer Fragment class. Please see the code below. public class LinearViewHolder extends RecyclerView.ViewHolder { public TextView countryName; public ImageView…
0
votes
3 answers

I want to make a card view for listing . But I am not getting proper view

I want to make a card view for listing . But I am not getting proper view . I want to display image in left side . on right side of image i want to display Hotel name, area ,rating,Cuisine . But all is getting overlapping now via this code . Can…
user6313669
  • 365
  • 2
  • 7
  • 22
0
votes
1 answer

setAnimation not working in LongClickListener

Why is my setAnimation not working in LongClickListener where as it is working fine in outside the LongClick listener? This is my java code for adding animation final Animation shake = AnimationUtils.loadAnimation(NavyashActivity.context,…
Yash Agrawal
  • 464
  • 4
  • 11
0
votes
2 answers

How to use same button with different functionality in different Fragments using same layout file in TabActivity

I have a question from last few days. I basically have three fragments in a TabActivity, Fragment A, Fragment B and Fragment C. All three Fragments contain a list of CardView of approximately 14 CardViews in single Fragment. This three Fragment…
-1
votes
2 answers

Android Studio Kotlin Recyclerview how to do multiple type view for specific object feature?

I have data from RickandMorty Api and saving them on CharacterList and I am showing them in a recyclerview.I have name,location and status informations and showing them in cards.I have another carditem for displaying dead users and I want to show…
CSS
  • 3
  • 5
-1
votes
1 answer

How to make this design with Cardview

i'm trying to make this design in xml but i'm not sure if it's possible what I want. I want to have a box and three icons (generated for every cardview) on the right separated in two layouts but all in the same cardview. Is it possible or do I have…
-1
votes
1 answer

Can anyone please explain why is this android layout not working and crashes the activity as soon as the activity is launched

This code is not working and the app is crashed all the time. Whenever I run the code, it shows an error. Even after can anyone please help me to remove this error. This error is also occuring whenever I am using TextInputLayout in my app. Gradle…
PaavanGupta
  • 21
  • 1
  • 7
-1
votes
1 answer

Swift blur cell is not displaying correctly

I want to create a blur table view cell with a top view like in the first image here: On iPhone 8, everything works correctly but on iPhone X after viewDidLoad it's not displaying correctly: After changing the ViewController and switching back…
flapper86
  • 1
  • 1
  • 3
-1
votes
4 answers

Cardview doesn't have any affect on items

I'm trying to make my RecyclerView prettier, so I added a CardView. However, I don't see any changes when I ran the app, the UI looks like as if there's no CardView at all - there is not separation between the items. Can you please suggest what's…
Keselme
  • 3,779
  • 7
  • 36
  • 68
-1
votes
2 answers

How to handle button click on recyclerView?

I have the following code, how do I handle the button click with the current card title? I have already tried everything I can, but just can't found a way to handle it. This is my current MainActivity: public class MainActivity extends…
-1
votes
1 answer

how to achieve good cardview like layouts in xamarin forms

I am using Frames in XAML to achieve card views. But this design is not anywhere close to the Google app card views or any other apps card views. Also, I do not see a nice shadow on all 3 sides instead it has a fake line of shadow Here is the…
Sai Sunkari
  • 179
  • 3
  • 27
-1
votes
1 answer

How to show multiple images inside one view with different image height and width?

How to show multiple images inside one view with different image height and width like collage view in android xml layout
Muhsin
  • 47
  • 3
  • 11
-1
votes
1 answer

Inner class constructor issue when creating adapter for GridView

I'm trying to add some items into a GridView programmatically but it's not working. I have seen answers for similar questions about this error, but I'm not sure of what should be done in this scenario. Creating an outer class or something…
wbk727
  • 8,017
  • 12
  • 61
  • 125
-1
votes
3 answers

/FIXED\ Android - TextView don't show below another TextView

I've got some TextView in a CardView, but when i try to set my TextView "text_lieu" below the TextView "text_nom", nothing happened they are confused. Can you help me please ? <3 Here my xml :
user9545141
-1
votes
1 answer

how can I remove empty space inside cardview?

I am a creating cv Android app but there are empty after TextView inside CardView below image below my xml code where I have implemented CardView as parent child as LinearLayout. below my xml code where I have implemented…