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

Change a CardView's row in a RecyclerView every x sec

Good morning, I am looking for an answer to my problem and I have not found. I want to change a single line of a CardView contained in a RecyclerView every x seconds. Just like Google+ where messages are changed every x seconds. See…
-1
votes
1 answer

Android: OnClick shows toast message but crashes when I start another activity

I am trying to call activity by clicking card view. The app is crashing when I click cardview: Here is the code: cardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { …
user6660129
-1
votes
2 answers

How to use multiple layout using one RecyclerView Adapter?

Hey guys I'm implementing two cards in an recyclerview and also created two view holder but didn't get the code for adapter help me guys. public class ViewHolder1 extends RecyclerView.ViewHolder { private TextView Chatin; public…
-1
votes
2 answers

Put text at the right end of the row

i have a CardView which has a table layout inside. In my table layout, i want a text view to appear on the right end of the row. my xml
-2
votes
1 answer

RecyclerView Crashes on Scrolldown ( IndexOutOfBoundsException: Index: 2, Size: 2 )

iam parsing data from json and pass it to an ArrayList that contains two Arraylists then pass them to a RecyclerView , The RecyclerView Shows The Data but 1 item Takes The whole page, and when i scroll down i can see the 2nd item and then it crashes…
-2
votes
2 answers

How to add a card view effect for a linear layout

How to add a card view effect for a linear layout I have a card View
Devrath
  • 42,072
  • 54
  • 195
  • 297
-2
votes
1 answer

i want to implement on onclicklistener on cardview and every card takes me to a different activity

I want to replace the toast and I want every card view when clicked takes the user to a new different activity. I would also like to implement Interstitial ads when the user clicks on the cardview. Here is my adapter class public class MyAdapter…
-2
votes
1 answer

Make android layout child wider than parent?

My code is:
Boldijar Paul
  • 5,405
  • 9
  • 46
  • 94
-2
votes
1 answer

SetText of TextView using String Array in a Fragment class

I am trying to make cards in a cardView like Duolingo, I found code online and I am trying to edit that code according to my needs. The issue is I do not know how to use the array list of String and change its text in each card as it changes. I…
sulli110
  • 145
  • 2
  • 16
-2
votes
2 answers

How to create a separate activity for each eBook?

I practiced with below source code. But I want to create separate activities for separate books.I can add more books to this app.But I can't create separate activities for each and every books.It means anyone click any book should open it's…
Mr.Mark
  • 13
  • 5
-2
votes
1 answer

custom CardView with recyclerview

hey, I stuck in one problem. I want to make this screen where I want to use edit option(which is shown in image) and custom logo(which in middle of each cardview). how can I use all these things? I am in the learning phase. please give some…
Sarvesh
  • 11
  • 1
  • 6
-2
votes
3 answers

creating Cardviews with Recyclerview

I'm creating Cardviews using Recyclerview such as every tutorial say, in Stackerflow and Youtube. It worked for me, but when i run the app, it shows something like only one Cardview with the whole data. Activity…
AtarC5
  • 393
  • 2
  • 11
  • 27
-2
votes
1 answer

Hi I am trying to create a e commerce app UI design like the image below

enter image description here I have a activity and i have to display multiple fragments cards as shown in the below image.How do i organize layouts. Please help me how to achieve the below design.
Praveen Cool
  • 261
  • 1
  • 4
  • 13
-2
votes
1 answer

java.lang.NullPointerException at CardView OnClick

I am trying to present a onClick at cardview button and I am getting this error. The Code is :: StaggeredGridLayoutManager gridLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL); …
Gunners.Ranju
  • 101
  • 3
  • 15
-2
votes
1 answer

How to fix the ArrayIndexOutOfBoundsException in Adapter android

I'm using CardView, Json to load data and display in list item. But I build the first time, it happened an exception is: ArrayIndexOutOfBoundsException My Adapter class: public class RecyclerViewAdapter extends…
1 2 3
37
38