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

make imageview accroding to cardview design

I have a CardView with rounded corners, I want to have an ImageView like cardview but it's not working. I have implemented this code in another project it's working fine but it's not working in my project please check my code i don't find any…
Keyur Patel
  • 172
  • 1
  • 2
  • 12
-1
votes
1 answer

Adding a CardView in a ScrollView

In my app i have a class called tasti.class where i have a simple layout with a ScrollView and some CardView's in it. It also has a button and when i press it it's open a custom AlertDialog so my question is how could i add other CardViews after i…
John K
  • 371
  • 5
  • 26
-1
votes
1 answer

How to center the CardView and get the proper color background?

I have an app that renders as follows: The white rectangle is a CardView. Here is the .xml that renders the activity:
IAbstract
  • 19,551
  • 15
  • 98
  • 146
-1
votes
1 answer

How to solve the issue "Binary XML file line #0: Error inflating class android.support.v7.widget.CardView"?

This is sure will a duplicate of This question.but I'm still unable to find the solution even crawling over the internet.I want to set the category in the Cate_layout by either using ArrayAdapter or someCustomAdapter(I have tried both, but no…
meditat
  • 1,197
  • 14
  • 33
-1
votes
1 answer

Change Background Color and Text in Single Cardview

I have a single card view that performs two functions: Start and Stop. When Start is pressed, the Start function begins and the txt changes to Stop and Lock Deactivated, as you can see in the if m(Started) statement below. In the else statement, I…
-1
votes
1 answer

Why onClick is not working in my code?

I have a TextView inside a CardView. I want some functionality to happen on click of the Textview but my android:onClick is not responding to the click as the method is not getting called. What is the issue? Help me Please. Here is my code: XML …
-1
votes
1 answer

how to change cardbackground dynamicaly taking image from array, and how to repeate these image array?

here is my view binder code - @Override public void onBindViewHolder(CardContentHolder holder, int position) { ListItem item = listdata.get(position); holder.title.setText(item.getTitle()); holder.subtitle.setText(item.getSubtitle()); …
-1
votes
2 answers

How to remove cardview background android

I have a cardview that contains an imageview like the screenshot: Since the image is round I would like to remove the cardview's background so the white square doesn't show. Here's my code:
MauriR
  • 537
  • 10
  • 20
-1
votes
1 answer

Is clicking on card for more information implied or should there be a button or text?

I have an Android mobile application with summary information in a cardview. The card/itemView has an onClickListener that launches another activity with more detailed information. I'm trying to figure out if the touch for more information is…
Tim OMalley
  • 423
  • 6
  • 14
-1
votes
1 answer

Put RecyclerView in front of Image

I am building an App that uses RecyclerView and CardView. Since RecyclerView doesn’t have an onItemClickListener method I found one class implementation that does this and was able to insert this class in my project. In each card I am putting one…
-1
votes
1 answer

TextView inside a CardView wont hide

I have 2 TextViews inside a CardView. I have to hide one of the TextView for Certain Conditons.Even after writing textview.SetVisibility(View.GONE),it still remains visible. Please help list_item.xml
Fargo
  • 1
  • 1
  • 6
-1
votes
1 answer

ViewPager call in Button any Fragment

I defined two Fragmetns. In Fragment "B" I have one Button. When I click this Button I want to call Fragment "A" passing a parameter. I want it so that when I click https://developer.android.com/training/material/lists-cards.html?hl=es
-1
votes
3 answers

Divide long TextView into small parts and make a cardview around these parts | Android

I have a question: Is it possible to divide a very long text, which the app gets from the Internet in a Json-data, into small parts of the text? Then these parts should be shown in single cardviews. If it's possible, can somebody show me how? I…
android
  • 21
  • 1
  • 5
-1
votes
2 answers

When i tried to include recycler and card view dependecies it shows this support libarary should not different version

apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.example.joshua.exigent" minSdkVersion 19 targetSdkVersion 23 …
joshua
  • 11
  • 5
-1
votes
2 answers

Load data if connected to the Internet

Helle Stack community, I created a simple app that loads a json and loads the data in a recyclerview. The recyclerview includes cardviews. The activity shows me a blank page if I haven't any internet connection, but normally I want to see some blank…
Paul Nie
  • 21
  • 5