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

RecyclerView - Remove Items and Leave Items Out

I have a two-part question that I am hoping someone can assist with. Essentially I am reading data from an API. One of the results of the API ( in a custom library I made for the app) is whether the result has an image or not. I am trying to add…
basic
  • 3,348
  • 3
  • 21
  • 36
0
votes
0 answers

RecyclerView inside CardView issue with UI

I'm having an special case where I need to show a list of items inside a CardView (or a view that is very similar to an CardView). The functionality works well, but I encountered some inconsistencies regarding the UI for this: On API bellow 21 the…
Ionut Negru
  • 6,186
  • 4
  • 48
  • 78
0
votes
1 answer

android cardview onclick to display more details

I'm working on an android rest client application, and i, now can retreive data from a local server but i'm willing to display more data when a cardview from my recycler view is clicked. So if anyone has an idea on how to do it, or a tutorial please…
DevRj
  • 448
  • 8
  • 19
0
votes
1 answer

Why is this RecyclerView + CardView example not working?

I am trying to create an app with a list of foods on the main activity and a checkbox for each food. I followed this tutorial in order to do the whole text and checkbox thing:…
0
votes
2 answers

Wordpress JSON Featured Image has low resolution in CardView?

App uses the JSON API plugin with the Glide library for images. For example, a high quality picture like…
CrisE4
  • 183
  • 2
  • 13
0
votes
1 answer

android.view.InflateException: Binary XML file line #30: Binary XML file line #30: Error inflating class

I am making a custom adapter in card view which loads data from a locally saved json file. I am able to fetch the data but the view is not being inflated and I keep on getting this error: E/AndroidRuntime: FATAL EXCEPTION: main Process:…
0
votes
2 answers

How to add setOnClickListener for each item in CardView

I have MainAcitivty.java private AlbumsAdapter adapter; private List albumList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar…
Lá Dối Trá
  • 31
  • 1
  • 1
  • 5
0
votes
1 answer

How to Create CardView programmatically with two text views aligned vertically in it?

Created a CardView instance and attached LinearLayout.LayoutParams, then added two TextViews to CardView, but TextViews overlap over each other instead of aligning one below the another LinearLayout.LayoutParams params = new…
murali kurapati
  • 1,510
  • 18
  • 23
0
votes
3 answers

CardView's image not showing in a RecyclerView

My problem is basically not being able to see a CardView's image when inside a RecyclerView. I will note that I use this card in other parts of the app and it doesn't make any problem - Also in the card XML are some parts that are also not relevant…
bluesummers
  • 11,365
  • 8
  • 72
  • 108
0
votes
1 answer

Sticky image at the bottom of other in android

I don't know the proper name of this feature, here is the image to understand my problem better. I need to create a layout of a image on the border-bottom of another image like the profile image is on the bottom of the big image. I am using a…
Atula
  • 2,177
  • 2
  • 12
  • 28
0
votes
1 answer

Use Firebase list adapter with Card View

I have my firebase list adapter as follows @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); mListview = (ListView) findViewById(R.id.listview); …
0
votes
2 answers

Android code : When clicked on an image a toast should SHOW by its IMAGE NAME.?

I have created a card view. Now i want to show A TOAST message with the image name that is clicked. Please help... MY JAVA CODE(fragment) WHICH IMAGES ARE ADDED.. public void prepareAlbums(){ int[] covers = new int[]{ …
0
votes
1 answer

I want to set this icon like if the user wants to mark this chapter as it will read tapper this icon, so it will chancher to another icon

I want to set this icon like if the user wants to mark this chapter as it will read tapper this icon, so it will chancher to another icon. image that described my work my files: SeptCoursAdapter.java public class SeptCoursAdapter extends…
0
votes
2 answers

Android instead a cardview in a recyclerview the app show me a blank page

guys I'm new in android programming and this is the second RecyclerView + cardview that I implement but I can't get what is wrong with this. The activity shows this: Image from the blank activity instead the recyclerView RecyclerView.xml
0
votes
2 answers

OnClick in a CardView layout

I have a xml that contains some CardView , I want to set onClick in the CardView includes to open an Activity in my project. I tried to set the onClick in the CardView layout as you will see in the code below, it opens normally but triggers…